diff --git a/client-adapter/clickhouse/pom.xml b/client-adapter/clickhouse/pom.xml index 50e9a62487..b4990386b3 100644 --- a/client-adapter/clickhouse/pom.xml +++ b/client-adapter/clickhouse/pom.xml @@ -58,7 +58,9 @@ + org.apache.maven.plugins maven-antrun-plugin + 1.8 package diff --git a/client-adapter/es6x/pom.xml b/client-adapter/es6x/pom.xml index bf0443f6cf..3767053a74 100644 --- a/client-adapter/es6x/pom.xml +++ b/client-adapter/es6x/pom.xml @@ -74,7 +74,9 @@ + org.apache.maven.plugins maven-antrun-plugin + 1.8 package diff --git a/client-adapter/es7x/pom.xml b/client-adapter/es7x/pom.xml index 2d92917a6b..39defd5717 100644 --- a/client-adapter/es7x/pom.xml +++ b/client-adapter/es7x/pom.xml @@ -74,7 +74,9 @@ + org.apache.maven.plugins maven-antrun-plugin + 1.8 package diff --git a/client-adapter/es8x/pom.xml b/client-adapter/es8x/pom.xml index fceb9f029a..5ab273c181 100644 --- a/client-adapter/es8x/pom.xml +++ b/client-adapter/es8x/pom.xml @@ -69,7 +69,9 @@ + org.apache.maven.plugins maven-antrun-plugin + 1.8 package diff --git a/client-adapter/hbase/pom.xml b/client-adapter/hbase/pom.xml index ab8e1a261b..1076e45a08 100644 --- a/client-adapter/hbase/pom.xml +++ b/client-adapter/hbase/pom.xml @@ -60,7 +60,9 @@ + org.apache.maven.plugins maven-antrun-plugin + 1.8 package diff --git a/client-adapter/kudu/pom.xml b/client-adapter/kudu/pom.xml index 2886a0c522..5a61226f8a 100644 --- a/client-adapter/kudu/pom.xml +++ b/client-adapter/kudu/pom.xml @@ -57,7 +57,9 @@ + org.apache.maven.plugins maven-antrun-plugin + 1.8 package diff --git a/client-adapter/launcher/pom.xml b/client-adapter/launcher/pom.xml index 3f8cd836d4..34246b918a 100644 --- a/client-adapter/launcher/pom.xml +++ b/client-adapter/launcher/pom.xml @@ -68,7 +68,6 @@ com.microsoft.sqlserver mssql-jdbc - org.apache.hbase hbase-shaded-client @@ -79,6 +78,18 @@ clickhouse-jdbc + + + io.prometheus + simpleclient_hotspot + 0.4.0 + + + io.prometheus + simpleclient_httpserver + 0.4.0 + + com.alibaba.otter diff --git a/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/CanalAdapterApplication.java b/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/CanalAdapterApplication.java index 2e3501dd31..990af7fa13 100644 --- a/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/CanalAdapterApplication.java +++ b/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/CanalAdapterApplication.java @@ -13,6 +13,7 @@ */ @SpringBootApplication(exclude= { DataSourceAutoConfiguration.class}) public class CanalAdapterApplication { + public static void main(String[] args) { // 支持rocketmq client 配置日志路径 System.setProperty("rocketmq.client.logUseSlf4j","true"); diff --git a/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/prometheus/CanalAdapterExports.java b/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/prometheus/CanalAdapterExports.java new file mode 100644 index 0000000000..7dd100bce3 --- /dev/null +++ b/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/prometheus/CanalAdapterExports.java @@ -0,0 +1,33 @@ +package com.alibaba.otter.canal.adapter.launcher.prometheus; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author sunxien + * @date 2025/5/19 + * @since 1.0.0-SNAPSHOT + */ +public class CanalAdapterExports { + + private static final Logger logger = LoggerFactory.getLogger(CanalAdapterExports.class); + + private CanalAdapterExports() { + } + + private static class SingletonHolder { + private static final CanalAdapterExports SINGLETON = new CanalAdapterExports(); + } + + public static CanalAdapterExports instance() { + return SingletonHolder.SINGLETON; + } + + public void initialize() { + // TODO + } + + public void terminate() { + // TODO + } +} diff --git a/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/prometheus/PrometheusService.java b/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/prometheus/PrometheusService.java new file mode 100644 index 0000000000..76fcf8c883 --- /dev/null +++ b/client-adapter/launcher/src/main/java/com/alibaba/otter/canal/adapter/launcher/prometheus/PrometheusService.java @@ -0,0 +1,98 @@ +package com.alibaba.otter.canal.adapter.launcher.prometheus; + +import io.prometheus.client.exporter.HTTPServer; +import io.prometheus.client.hotspot.DefaultExports; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.stereotype.Component; + +import java.io.IOException; + +/** + * @author sunxien + * @date 2025/5/19 + * @since 1.0.0-SNAPSHOT + */ +@Component +public class PrometheusService implements InitializingBean, DisposableBean { + + private static final Logger logger = LoggerFactory.getLogger(PrometheusService.class); + + private final CanalAdapterExports adapterExports; + private volatile boolean running = false; + + /** + *
+     * Canal Server admin port: 11112
+     * Canal Server tcp port: 11111
+     * Canal Adapter metric port: 11113
+     * 
+ */ + private int port = 11113; + private HTTPServer httpServer; + + private PrometheusService() { + this.adapterExports = CanalAdapterExports.instance(); + } + + private static class SingletonHolder { + private static final PrometheusService SINGLETON = new PrometheusService(); + } + + public static PrometheusService getInstance() { + return SingletonHolder.SINGLETON; + } + + @Override + public void afterPropertiesSet() throws Exception { + PrometheusService.getInstance().initialize(); + } + + @Override + public void destroy() throws Exception { + PrometheusService.getInstance().terminate(); + } + + public void initialize() { + try { + logger.info("Starting prometheus HTTPServer on port {}....", port); + // TODO 2.Https? + httpServer = new HTTPServer(port); + logger.info("Start prometheus HTTPServer on port {} success", port); + } catch (IOException e) { + logger.error("Unable to start prometheus HTTPServer on port {}.", port, e); + return; + } + try { + // JVM exports + DefaultExports.initialize(); + // adapterExports.initialize(); + this.running = true; + } catch (Throwable t) { + logger.error("Unable to initialize adapter exports. (Register the default Hotspot collectors)", t); + } + } + + public void terminate() { + try { + this.running = false; + adapterExports.terminate(); + if (httpServer != null) { + httpServer.stop(); + logger.info("Stop prometheus HTTPServer on port {} success", port); + } + } catch (Throwable t) { + logger.error("Something happened while terminating prometheus HTTPServer.", t); + } + } + + public boolean isRunning() { + return running; + } + + public void setServerPort(int port) { + this.port = port; + } +} diff --git a/client-adapter/phoenix/pom.xml b/client-adapter/phoenix/pom.xml index 0e597a45ad..a981331394 100644 --- a/client-adapter/phoenix/pom.xml +++ b/client-adapter/phoenix/pom.xml @@ -100,7 +100,9 @@
+ org.apache.maven.plugins maven-antrun-plugin + 1.8 package diff --git a/client-adapter/rdb/pom.xml b/client-adapter/rdb/pom.xml index b601149fd8..03a0176f65 100644 --- a/client-adapter/rdb/pom.xml +++ b/client-adapter/rdb/pom.xml @@ -68,7 +68,9 @@ + org.apache.maven.plugins maven-antrun-plugin + 1.8 package diff --git a/client-adapter/tablestore/pom.xml b/client-adapter/tablestore/pom.xml index b0546a7a60..3e4b2c05fc 100644 --- a/client-adapter/tablestore/pom.xml +++ b/client-adapter/tablestore/pom.xml @@ -66,7 +66,9 @@ + org.apache.maven.plugins maven-antrun-plugin + 1.8 package diff --git a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/MariaGtid.java b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/MariaGtid.java index aa29b27d93..37a2c5182c 100644 --- a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/MariaGtid.java +++ b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/MariaGtid.java @@ -72,6 +72,10 @@ public boolean equals(Object o) { @Override public String toString() { - return String.format("%s-%s-%s", domainId, serverId, sequence); + StringBuilder sb = new StringBuilder(16); + sb.append(domainId).append("-"); + sb.append(serverId).append("-"); + return sb.append(sequence).toString(); + // return String.format("%s-%s-%s", domainId, serverId, sequence); } } diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/DatabaseTableMeta.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/DatabaseTableMeta.java index fc414a9931..943ce4b0d0 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/DatabaseTableMeta.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/DatabaseTableMeta.java @@ -13,6 +13,8 @@ import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.regex.Pattern; + +import com.alibaba.fastjson2.JSONWriter; import com.alibaba.otter.canal.parse.driver.mysql.packets.server.FieldPacket; import com.alibaba.polardbx.druid.sql.repository.Schema; import org.apache.commons.beanutils.BeanUtils; @@ -369,7 +371,7 @@ private boolean applySnapshotToDB(EntryPosition position, boolean init) { snapshotDO.setBinlogOffest(position.getPosition()); snapshotDO.setBinlogMasterId(String.valueOf(position.getServerId())); snapshotDO.setBinlogTimestamp(position.getTimestamp()); - snapshotDO.setData(JSON.toJSONString(schemaDdls)); + snapshotDO.setData(JSON.toJSONString(schemaDdls, JSONWriter.Feature.LargeObject)); try { metaSnapshotDAO.insert(snapshotDO); } catch (Throwable e) { diff --git a/pom.xml b/pom.xml index edd431f9c0..757a921a42 100644 --- a/pom.xml +++ b/pom.xml @@ -311,7 +311,8 @@ com.google.protobuf protobuf-java - 3.6.1 + + 4.31.0 org.mybatis diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/AdminPacket.java b/protocol/src/main/java/com/alibaba/otter/canal/protocol/AdminPacket.java index 8feb63125a..27b8c1e766 100644 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/AdminPacket.java +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/AdminPacket.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: AdminProtocol.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: com/alibaba/otter/canal/protocol/AdminProtocol.proto +// Protobuf Java Version: 4.29.3 package com.alibaba.otter.canal.protocol; public final class AdminPacket { private AdminPacket() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + AdminPacket.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -21,7 +32,7 @@ public enum PacketType implements com.google.protobuf.ProtocolMessageEnum { /** *
-     *compatible
+     * compatible
      * 
* * PACKAGETYPECOMPATIBLEPROTO2 = 0; @@ -54,9 +65,18 @@ public enum PacketType UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + PacketType.class.getName()); + } /** *
-     *compatible
+     * compatible
      * 
* * PACKAGETYPECOMPATIBLEPROTO2 = 0; @@ -97,6 +117,8 @@ public final int getNumber() { } /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -104,6 +126,10 @@ public static PacketType valueOf(int value) { return forNumber(value); } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ public static PacketType forNumber(int value) { switch (value) { case 0: return PACKAGETYPECOMPATIBLEPROTO2; @@ -131,6 +157,10 @@ public PacketType findValueByNumber(int number) { public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor @@ -171,42 +201,66 @@ public interface PacketOrBuilder extends /** * int32 magic_number = 1; + * @return Whether the magicNumber field is set. + */ + boolean hasMagicNumber(); + /** + * int32 magic_number = 1; + * @return The magicNumber. */ int getMagicNumber(); /** * int32 version = 2; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + * int32 version = 2; + * @return The version. */ int getVersion(); /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The enum numeric value on the wire for type. */ int getTypeValue(); /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The type. */ com.alibaba.otter.canal.protocol.AdminPacket.PacketType getType(); /** * bytes body = 4; + * @return The body. */ com.google.protobuf.ByteString getBody(); - public com.alibaba.otter.canal.protocol.AdminPacket.Packet.MagicNumberPresentCase getMagicNumberPresentCase(); + com.alibaba.otter.canal.protocol.AdminPacket.Packet.MagicNumberPresentCase getMagicNumberPresentCase(); - public com.alibaba.otter.canal.protocol.AdminPacket.Packet.VersionPresentCase getVersionPresentCase(); + com.alibaba.otter.canal.protocol.AdminPacket.Packet.VersionPresentCase getVersionPresentCase(); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Packet} */ - public static final class Packet extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Packet extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Packet) PacketOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Packet.class.getName()); + } // Use Packet.newBuilder() to construct. - private Packet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Packet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Packet() { @@ -214,77 +268,13 @@ private Packet() { body_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Packet( - 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: { - magicNumberPresentCase_ = 1; - magicNumberPresent_ = input.readInt32(); - break; - } - case 16: { - versionPresentCase_ = 2; - versionPresent_ = input.readInt32(); - break; - } - case 24: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: { - - body_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -292,9 +282,11 @@ private Packet( } private int magicNumberPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object magicNumberPresent_; public enum MagicNumberPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { MAGIC_NUMBER(1), MAGICNUMBERPRESENT_NOT_SET(0); private final int value; @@ -302,6 +294,8 @@ private MagicNumberPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -328,9 +322,11 @@ public int getNumber() { } private int versionPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object versionPresent_; public enum VersionPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { VERSION(2), VERSIONPRESENT_NOT_SET(0); private final int value; @@ -338,6 +334,8 @@ private VersionPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -366,7 +364,17 @@ public int getNumber() { public static final int MAGIC_NUMBER_FIELD_NUMBER = 1; /** * int32 magic_number = 1; + * @return Whether the magicNumber field is set. */ + @java.lang.Override + public boolean hasMagicNumber() { + return magicNumberPresentCase_ == 1; + } + /** + * int32 magic_number = 1; + * @return The magicNumber. + */ + @java.lang.Override public int getMagicNumber() { if (magicNumberPresentCase_ == 1) { return (java.lang.Integer) magicNumberPresent_; @@ -377,7 +385,17 @@ public int getMagicNumber() { public static final int VERSION_FIELD_NUMBER = 2; /** * int32 version = 2; + * @return Whether the version field is set. */ + @java.lang.Override + public boolean hasVersion() { + return versionPresentCase_ == 2; + } + /** + * int32 version = 2; + * @return The version. + */ + @java.lang.Override public int getVersion() { if (versionPresentCase_ == 2) { return (java.lang.Integer) versionPresent_; @@ -386,27 +404,30 @@ public int getVersion() { } public static final int TYPE_FIELD_NUMBER = 3; - private int type_; + private int type_ = 0; /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The enum numeric value on the wire for type. */ - public int getTypeValue() { + @java.lang.Override public int getTypeValue() { return type_; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The type. */ - public com.alibaba.otter.canal.protocol.AdminPacket.PacketType getType() { - @SuppressWarnings("deprecation") - com.alibaba.otter.canal.protocol.AdminPacket.PacketType result = com.alibaba.otter.canal.protocol.AdminPacket.PacketType.valueOf(type_); + @java.lang.Override public com.alibaba.otter.canal.protocol.AdminPacket.PacketType getType() { + com.alibaba.otter.canal.protocol.AdminPacket.PacketType result = com.alibaba.otter.canal.protocol.AdminPacket.PacketType.forNumber(type_); return result == null ? com.alibaba.otter.canal.protocol.AdminPacket.PacketType.UNRECOGNIZED : result; } public static final int BODY_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString body_; + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; /** * bytes body = 4; + * @return The body. */ + @java.lang.Override public com.google.protobuf.ByteString getBody() { return body_; } @@ -439,7 +460,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!body_.isEmpty()) { output.writeBytes(4, body_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -466,7 +487,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, body_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -481,34 +502,29 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.AdminPacket.Packet other = (com.alibaba.otter.canal.protocol.AdminPacket.Packet) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && getBody() - .equals(other.getBody()); - result = result && getMagicNumberPresentCase().equals( - other.getMagicNumberPresentCase()); - if (!result) return false; + if (type_ != other.type_) return false; + if (!getBody() + .equals(other.getBody())) return false; + if (!getMagicNumberPresentCase().equals(other.getMagicNumberPresentCase())) return false; switch (magicNumberPresentCase_) { case 1: - result = result && (getMagicNumber() - == other.getMagicNumber()); + if (getMagicNumber() + != other.getMagicNumber()) return false; break; case 0: default: } - result = result && getVersionPresentCase().equals( - other.getVersionPresentCase()); - if (!result) return false; + if (!getVersionPresentCase().equals(other.getVersionPresentCase())) return false; switch (versionPresentCase_) { case 2: - result = result && (getVersion() - == other.getVersion()); + if (getVersion() + != other.getVersion()) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -538,7 +554,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,39 +593,41 @@ public static com.alibaba.otter.canal.protocol.AdminPacket.Packet parseFrom( } public static com.alibaba.otter.canal.protocol.AdminPacket.Packet parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.Packet parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.AdminPacket.Packet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.AdminPacket.Packet parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.AdminPacket.Packet parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.Packet parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -629,7 +647,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -637,7 +655,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.Packet} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Packet) com.alibaba.otter.canal.protocol.AdminPacket.PacketOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -646,7 +664,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -655,26 +673,20 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.AdminPacket.Packet.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; type_ = 0; - body_ = com.google.protobuf.ByteString.EMPTY; - magicNumberPresentCase_ = 0; magicNumberPresent_ = null; versionPresentCase_ = 0; @@ -705,52 +717,29 @@ public com.alibaba.otter.canal.protocol.AdminPacket.Packet build() { @java.lang.Override public com.alibaba.otter.canal.protocol.AdminPacket.Packet buildPartial() { com.alibaba.otter.canal.protocol.AdminPacket.Packet result = new com.alibaba.otter.canal.protocol.AdminPacket.Packet(this); - if (magicNumberPresentCase_ == 1) { - result.magicNumberPresent_ = magicNumberPresent_; - } - if (versionPresentCase_ == 2) { - result.versionPresent_ = versionPresent_; - } - result.type_ = type_; - result.body_ = body_; - result.magicNumberPresentCase_ = magicNumberPresentCase_; - result.versionPresentCase_ = versionPresentCase_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.AdminPacket.Packet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.body_ = body_; + } } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.AdminPacket.Packet result) { + result.magicNumberPresentCase_ = magicNumberPresentCase_; + result.magicNumberPresent_ = this.magicNumberPresent_; + result.versionPresentCase_ = versionPresentCase_; + result.versionPresent_ = this.versionPresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.AdminPacket.Packet) { @@ -787,7 +776,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.Packet oth break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -802,17 +791,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.AdminPacket.Packet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + magicNumberPresent_ = input.readInt32(); + magicNumberPresentCase_ = 1; + break; + } // case 8 + case 16: { + versionPresent_ = input.readInt32(); + versionPresentCase_ = 2; + break; + } // case 16 + case 24: { + type_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + body_ = input.readBytes(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.AdminPacket.Packet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int magicNumberPresentCase_ = 0; @@ -845,9 +867,18 @@ public Builder clearVersionPresent() { return this; } + private int bitField0_; /** * int32 magic_number = 1; + * @return Whether the magicNumber field is set. + */ + public boolean hasMagicNumber() { + return magicNumberPresentCase_ == 1; + } + /** + * int32 magic_number = 1; + * @return The magicNumber. */ public int getMagicNumber() { if (magicNumberPresentCase_ == 1) { @@ -857,8 +888,11 @@ public int getMagicNumber() { } /** * int32 magic_number = 1; + * @param value The magicNumber to set. + * @return This builder for chaining. */ public Builder setMagicNumber(int value) { + magicNumberPresentCase_ = 1; magicNumberPresent_ = value; onChanged(); @@ -866,6 +900,7 @@ public Builder setMagicNumber(int value) { } /** * int32 magic_number = 1; + * @return This builder for chaining. */ public Builder clearMagicNumber() { if (magicNumberPresentCase_ == 1) { @@ -878,6 +913,14 @@ public Builder clearMagicNumber() { /** * int32 version = 2; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return versionPresentCase_ == 2; + } + /** + * int32 version = 2; + * @return The version. */ public int getVersion() { if (versionPresentCase_ == 2) { @@ -887,8 +930,11 @@ public int getVersion() { } /** * int32 version = 2; + * @param value The version to set. + * @return This builder for chaining. */ public Builder setVersion(int value) { + versionPresentCase_ = 2; versionPresent_ = value; onChanged(); @@ -896,6 +942,7 @@ public Builder setVersion(int value) { } /** * int32 version = 2; + * @return This builder for chaining. */ public Builder clearVersion() { if (versionPresentCase_ == 2) { @@ -909,43 +956,51 @@ public Builder clearVersion() { private int type_ = 0; /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The enum numeric value on the wire for type. */ - public int getTypeValue() { + @java.lang.Override public int getTypeValue() { return type_; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The type. */ + @java.lang.Override public com.alibaba.otter.canal.protocol.AdminPacket.PacketType getType() { - @SuppressWarnings("deprecation") - com.alibaba.otter.canal.protocol.AdminPacket.PacketType result = com.alibaba.otter.canal.protocol.AdminPacket.PacketType.valueOf(type_); + com.alibaba.otter.canal.protocol.AdminPacket.PacketType result = com.alibaba.otter.canal.protocol.AdminPacket.PacketType.forNumber(type_); return result == null ? com.alibaba.otter.canal.protocol.AdminPacket.PacketType.UNRECOGNIZED : result; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @param value The type to set. + * @return This builder for chaining. */ public Builder setType(com.alibaba.otter.canal.protocol.AdminPacket.PacketType value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000004; type_ = value.getNumber(); onChanged(); return this; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return This builder for chaining. */ public Builder clearType() { - + bitField0_ = (bitField0_ & ~0x00000004); type_ = 0; onChanged(); return this; @@ -954,43 +1009,34 @@ public Builder clearType() { private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; /** * bytes body = 4; + * @return The body. */ + @java.lang.Override public com.google.protobuf.ByteString getBody() { return body_; } /** * bytes body = 4; + * @param value The body to set. + * @return This builder for chaining. */ public Builder setBody(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } body_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** * bytes body = 4; + * @return This builder for chaining. */ public Builder clearBody() { - + bitField0_ = (bitField0_ & ~0x00000008); body_ = getDefaultInstance().getBody(); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Packet) } @@ -1012,7 +1058,18 @@ public Packet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Packet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1038,6 +1095,12 @@ public interface AckOrBuilder extends /** * int32 code = 1; + * @return Whether the code field is set. + */ + boolean hasCode(); + /** + * int32 code = 1; + * @return The code. */ int getCode(); @@ -1047,6 +1110,7 @@ public interface AckOrBuilder extends * * * string message = 2; + * @return The message. */ java.lang.String getMessage(); /** @@ -1055,89 +1119,45 @@ public interface AckOrBuilder extends * * * string message = 2; + * @return The bytes for message. */ com.google.protobuf.ByteString getMessageBytes(); - public com.alibaba.otter.canal.protocol.AdminPacket.Ack.ErrorCodePresentCase getErrorCodePresentCase(); + com.alibaba.otter.canal.protocol.AdminPacket.Ack.ErrorCodePresentCase getErrorCodePresentCase(); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Ack} */ - public static final class Ack extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Ack extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Ack) AckOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Ack.class.getName()); + } // Use Ack.newBuilder() to construct. - private Ack(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Ack(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Ack() { message_ = ""; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Ack( - 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: { - errorCodePresentCase_ = 1; - errorCodePresent_ = input.readInt32(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1145,9 +1165,11 @@ private Ack( } private int errorCodePresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object errorCodePresent_; public enum ErrorCodePresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { CODE(1), ERRORCODEPRESENT_NOT_SET(0); private final int value; @@ -1155,6 +1177,8 @@ private ErrorCodePresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -1183,7 +1207,17 @@ public int getNumber() { public static final int CODE_FIELD_NUMBER = 1; /** * int32 code = 1; + * @return Whether the code field is set. + */ + @java.lang.Override + public boolean hasCode() { + return errorCodePresentCase_ == 1; + } + /** + * int32 code = 1; + * @return The code. */ + @java.lang.Override public int getCode() { if (errorCodePresentCase_ == 1) { return (java.lang.Integer) errorCodePresent_; @@ -1192,14 +1226,17 @@ public int getCode() { } public static final int MESSAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object message_; + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; /** *
      * if something like compression is not supported, erorr_message will tell about it.
      * 
* * string message = 2; + * @return The message. */ + @java.lang.Override public java.lang.String getMessage() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { @@ -1218,7 +1255,9 @@ public java.lang.String getMessage() { * * * string message = 2; + * @return The bytes for message. */ + @java.lang.Override public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; @@ -1251,10 +1290,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt32( 1, (int)((java.lang.Integer) errorCodePresent_)); } - if (!getMessageBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1268,10 +1307,10 @@ public int getSerializedSize() { .computeInt32Size( 1, (int)((java.lang.Integer) errorCodePresent_)); } - if (!getMessageBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1286,22 +1325,19 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.AdminPacket.Ack other = (com.alibaba.otter.canal.protocol.AdminPacket.Ack) obj; - boolean result = true; - result = result && getMessage() - .equals(other.getMessage()); - result = result && getErrorCodePresentCase().equals( - other.getErrorCodePresentCase()); - if (!result) return false; + if (!getMessage() + .equals(other.getMessage())) return false; + if (!getErrorCodePresentCase().equals(other.getErrorCodePresentCase())) return false; switch (errorCodePresentCase_) { case 1: - result = result && (getCode() - == other.getCode()); + if (getCode() + != other.getCode()) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -1321,7 +1357,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1360,39 +1396,41 @@ public static com.alibaba.otter.canal.protocol.AdminPacket.Ack parseFrom( } public static com.alibaba.otter.canal.protocol.AdminPacket.Ack parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.Ack parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.AdminPacket.Ack parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.AdminPacket.Ack parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.AdminPacket.Ack parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.Ack parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1412,7 +1450,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1420,7 +1458,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.Ack} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Ack) com.alibaba.otter.canal.protocol.AdminPacket.AckOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1429,7 +1467,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1438,24 +1476,19 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.AdminPacket.Ack.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; message_ = ""; - errorCodePresentCase_ = 0; errorCodePresent_ = null; return this; @@ -1484,47 +1517,24 @@ public com.alibaba.otter.canal.protocol.AdminPacket.Ack build() { @java.lang.Override public com.alibaba.otter.canal.protocol.AdminPacket.Ack buildPartial() { com.alibaba.otter.canal.protocol.AdminPacket.Ack result = new com.alibaba.otter.canal.protocol.AdminPacket.Ack(this); - if (errorCodePresentCase_ == 1) { - result.errorCodePresent_ = errorCodePresent_; - } - result.message_ = message_; - result.errorCodePresentCase_ = errorCodePresentCase_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.AdminPacket.Ack result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.AdminPacket.Ack result) { + result.errorCodePresentCase_ = errorCodePresentCase_; + result.errorCodePresent_ = this.errorCodePresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.AdminPacket.Ack) { @@ -1539,6 +1549,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.Ack other) if (other == com.alibaba.otter.canal.protocol.AdminPacket.Ack.getDefaultInstance()) return this; if (!other.getMessage().isEmpty()) { message_ = other.message_; + bitField0_ |= 0x00000002; onChanged(); } switch (other.getErrorCodePresentCase()) { @@ -1550,7 +1561,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.Ack other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1565,17 +1576,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.AdminPacket.Ack parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + errorCodePresent_ = input.readInt32(); + errorCodePresentCase_ = 1; + break; + } // case 8 + case 18: { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.AdminPacket.Ack) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int errorCodePresentCase_ = 0; @@ -1593,9 +1627,18 @@ public Builder clearErrorCodePresent() { return this; } + private int bitField0_; /** * int32 code = 1; + * @return Whether the code field is set. + */ + public boolean hasCode() { + return errorCodePresentCase_ == 1; + } + /** + * int32 code = 1; + * @return The code. */ public int getCode() { if (errorCodePresentCase_ == 1) { @@ -1605,8 +1648,11 @@ public int getCode() { } /** * int32 code = 1; + * @param value The code to set. + * @return This builder for chaining. */ public Builder setCode(int value) { + errorCodePresentCase_ = 1; errorCodePresent_ = value; onChanged(); @@ -1614,6 +1660,7 @@ public Builder setCode(int value) { } /** * int32 code = 1; + * @return This builder for chaining. */ public Builder clearCode() { if (errorCodePresentCase_ == 1) { @@ -1631,6 +1678,7 @@ public Builder clearCode() { * * * string message = 2; + * @return The message. */ public java.lang.String getMessage() { java.lang.Object ref = message_; @@ -1650,6 +1698,7 @@ public java.lang.String getMessage() { * * * string message = 2; + * @return The bytes for message. */ public com.google.protobuf.ByteString getMessageBytes() { @@ -1670,14 +1719,14 @@ public java.lang.String getMessage() { * * * string message = 2; + * @param value The message to set. + * @return This builder for chaining. */ public Builder setMessage( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } message_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1687,10 +1736,11 @@ public Builder setMessage( * * * string message = 2; + * @return This builder for chaining. */ public Builder clearMessage() { - message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -1700,30 +1750,18 @@ public Builder clearMessage() { * * * string message = 2; + * @param value The bytes for message to set. + * @return This builder for chaining. */ public Builder setMessageBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); message_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Ack) } @@ -1745,7 +1783,18 @@ public Ack parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Ack(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1771,98 +1820,61 @@ public interface HandshakeOrBuilder extends /** * string communication_encoding = 1; + * @return Whether the communicationEncoding field is set. + */ + boolean hasCommunicationEncoding(); + /** + * string communication_encoding = 1; + * @return The communicationEncoding. */ java.lang.String getCommunicationEncoding(); /** * string communication_encoding = 1; + * @return The bytes for communicationEncoding. */ com.google.protobuf.ByteString getCommunicationEncodingBytes(); /** * bytes seeds = 2; + * @return The seeds. */ com.google.protobuf.ByteString getSeeds(); - public com.alibaba.otter.canal.protocol.AdminPacket.Handshake.CommunicationEncodingPresentCase getCommunicationEncodingPresentCase(); + com.alibaba.otter.canal.protocol.AdminPacket.Handshake.CommunicationEncodingPresentCase getCommunicationEncodingPresentCase(); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Handshake} */ - public static final class Handshake extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Handshake extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Handshake) HandshakeOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Handshake.class.getName()); + } // Use Handshake.newBuilder() to construct. - private Handshake(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Handshake(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Handshake() { seeds_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Handshake( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - communicationEncodingPresentCase_ = 1; - communicationEncodingPresent_ = s; - break; - } - case 18: { - - seeds_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1870,9 +1882,11 @@ private Handshake( } private int communicationEncodingPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object communicationEncodingPresent_; public enum CommunicationEncodingPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { COMMUNICATION_ENCODING(1), COMMUNICATIONENCODINGPRESENT_NOT_SET(0); private final int value; @@ -1880,6 +1894,8 @@ private CommunicationEncodingPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -1908,6 +1924,14 @@ public int getNumber() { public static final int COMMUNICATION_ENCODING_FIELD_NUMBER = 1; /** * string communication_encoding = 1; + * @return Whether the communicationEncoding field is set. + */ + public boolean hasCommunicationEncoding() { + return communicationEncodingPresentCase_ == 1; + } + /** + * string communication_encoding = 1; + * @return The communicationEncoding. */ public java.lang.String getCommunicationEncoding() { java.lang.Object ref = ""; @@ -1928,6 +1952,7 @@ public java.lang.String getCommunicationEncoding() { } /** * string communication_encoding = 1; + * @return The bytes for communicationEncoding. */ public com.google.protobuf.ByteString getCommunicationEncodingBytes() { @@ -1949,10 +1974,12 @@ public java.lang.String getCommunicationEncoding() { } public static final int SEEDS_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString seeds_; + private com.google.protobuf.ByteString seeds_ = com.google.protobuf.ByteString.EMPTY; /** * bytes seeds = 2; + * @return The seeds. */ + @java.lang.Override public com.google.protobuf.ByteString getSeeds() { return seeds_; } @@ -1972,12 +1999,12 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (communicationEncodingPresentCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, communicationEncodingPresent_); + com.google.protobuf.GeneratedMessage.writeString(output, 1, communicationEncodingPresent_); } if (!seeds_.isEmpty()) { output.writeBytes(2, seeds_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1987,13 +2014,13 @@ public int getSerializedSize() { size = 0; if (communicationEncodingPresentCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, communicationEncodingPresent_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, communicationEncodingPresent_); } if (!seeds_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, seeds_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2008,22 +2035,19 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.AdminPacket.Handshake other = (com.alibaba.otter.canal.protocol.AdminPacket.Handshake) obj; - boolean result = true; - result = result && getSeeds() - .equals(other.getSeeds()); - result = result && getCommunicationEncodingPresentCase().equals( - other.getCommunicationEncodingPresentCase()); - if (!result) return false; + if (!getSeeds() + .equals(other.getSeeds())) return false; + if (!getCommunicationEncodingPresentCase().equals(other.getCommunicationEncodingPresentCase())) return false; switch (communicationEncodingPresentCase_) { case 1: - result = result && getCommunicationEncoding() - .equals(other.getCommunicationEncoding()); + if (!getCommunicationEncoding() + .equals(other.getCommunicationEncoding())) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -2043,7 +2067,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2082,39 +2106,41 @@ public static com.alibaba.otter.canal.protocol.AdminPacket.Handshake parseFrom( } public static com.alibaba.otter.canal.protocol.AdminPacket.Handshake parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.Handshake parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.AdminPacket.Handshake parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.AdminPacket.Handshake parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.AdminPacket.Handshake parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.Handshake parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2134,7 +2160,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2142,7 +2168,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.Handshake} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Handshake) com.alibaba.otter.canal.protocol.AdminPacket.HandshakeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2151,7 +2177,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2160,24 +2186,19 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.AdminPacket.Handshake.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; seeds_ = com.google.protobuf.ByteString.EMPTY; - communicationEncodingPresentCase_ = 0; communicationEncodingPresent_ = null; return this; @@ -2206,47 +2227,24 @@ public com.alibaba.otter.canal.protocol.AdminPacket.Handshake build() { @java.lang.Override public com.alibaba.otter.canal.protocol.AdminPacket.Handshake buildPartial() { com.alibaba.otter.canal.protocol.AdminPacket.Handshake result = new com.alibaba.otter.canal.protocol.AdminPacket.Handshake(this); - if (communicationEncodingPresentCase_ == 1) { - result.communicationEncodingPresent_ = communicationEncodingPresent_; - } - result.seeds_ = seeds_; - result.communicationEncodingPresentCase_ = communicationEncodingPresentCase_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.AdminPacket.Handshake result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.seeds_ = seeds_; + } } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.AdminPacket.Handshake result) { + result.communicationEncodingPresentCase_ = communicationEncodingPresentCase_; + result.communicationEncodingPresent_ = this.communicationEncodingPresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.AdminPacket.Handshake) { @@ -2273,7 +2271,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.Handshake break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2288,17 +2286,41 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.AdminPacket.Handshake parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + communicationEncodingPresentCase_ = 1; + communicationEncodingPresent_ = s; + break; + } // case 10 + case 18: { + seeds_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.AdminPacket.Handshake) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int communicationEncodingPresentCase_ = 0; @@ -2316,10 +2338,21 @@ public Builder clearCommunicationEncodingPresent() { return this; } + private int bitField0_; /** * string communication_encoding = 1; + * @return Whether the communicationEncoding field is set. */ + @java.lang.Override + public boolean hasCommunicationEncoding() { + return communicationEncodingPresentCase_ == 1; + } + /** + * string communication_encoding = 1; + * @return The communicationEncoding. + */ + @java.lang.Override public java.lang.String getCommunicationEncoding() { java.lang.Object ref = ""; if (communicationEncodingPresentCase_ == 1) { @@ -2339,7 +2372,9 @@ public java.lang.String getCommunicationEncoding() { } /** * string communication_encoding = 1; + * @return The bytes for communicationEncoding. */ + @java.lang.Override public com.google.protobuf.ByteString getCommunicationEncodingBytes() { java.lang.Object ref = ""; @@ -2360,19 +2395,20 @@ public java.lang.String getCommunicationEncoding() { } /** * string communication_encoding = 1; + * @param value The communicationEncoding to set. + * @return This builder for chaining. */ public Builder setCommunicationEncoding( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - communicationEncodingPresentCase_ = 1; + if (value == null) { throw new NullPointerException(); } + communicationEncodingPresentCase_ = 1; communicationEncodingPresent_ = value; onChanged(); return this; } /** * string communication_encoding = 1; + * @return This builder for chaining. */ public Builder clearCommunicationEncoding() { if (communicationEncodingPresentCase_ == 1) { @@ -2384,13 +2420,13 @@ public Builder clearCommunicationEncoding() { } /** * string communication_encoding = 1; + * @param value The bytes for communicationEncoding to set. + * @return This builder for chaining. */ public Builder setCommunicationEncodingBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); communicationEncodingPresentCase_ = 1; communicationEncodingPresent_ = value; onChanged(); @@ -2400,43 +2436,34 @@ public Builder setCommunicationEncodingBytes( private com.google.protobuf.ByteString seeds_ = com.google.protobuf.ByteString.EMPTY; /** * bytes seeds = 2; + * @return The seeds. */ + @java.lang.Override public com.google.protobuf.ByteString getSeeds() { return seeds_; } /** * bytes seeds = 2; + * @param value The seeds to set. + * @return This builder for chaining. */ public Builder setSeeds(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } seeds_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** * bytes seeds = 2; + * @return This builder for chaining. */ public Builder clearSeeds() { - + bitField0_ = (bitField0_ & ~0x00000002); seeds_ = getDefaultInstance().getSeeds(); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Handshake) } @@ -2458,7 +2485,18 @@ public Handshake parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Handshake(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2484,10 +2522,12 @@ public interface ClientAuthOrBuilder extends /** * string username = 1; + * @return The username. */ java.lang.String getUsername(); /** * string username = 1; + * @return The bytes for username. */ com.google.protobuf.ByteString getUsernameBytes(); @@ -2498,6 +2538,7 @@ public interface ClientAuthOrBuilder extends * * * bytes password = 2; + * @return The password. */ com.google.protobuf.ByteString getPassword(); @@ -2507,6 +2548,16 @@ public interface ClientAuthOrBuilder extends * * * int32 net_read_timeout = 3; + * @return Whether the netReadTimeout field is set. + */ + boolean hasNetReadTimeout(); + /** + *
+     * in seconds
+     * 
+ * + * int32 net_read_timeout = 3; + * @return The netReadTimeout. */ int getNetReadTimeout(); @@ -2516,12 +2567,22 @@ public interface ClientAuthOrBuilder extends * * * int32 net_write_timeout = 4; + * @return Whether the netWriteTimeout field is set. + */ + boolean hasNetWriteTimeout(); + /** + *
+     * in seconds
+     * 
+ * + * int32 net_write_timeout = 4; + * @return The netWriteTimeout. */ int getNetWriteTimeout(); - public com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth.NetReadTimeoutPresentCase getNetReadTimeoutPresentCase(); + com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth.NetReadTimeoutPresentCase getNetReadTimeoutPresentCase(); - public com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth.NetWriteTimeoutPresentCase getNetWriteTimeoutPresentCase(); + com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth.NetWriteTimeoutPresentCase getNetWriteTimeoutPresentCase(); } /** *
@@ -2530,13 +2591,22 @@ public interface ClientAuthOrBuilder extends
    *
    * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAuth}
    */
-  public  static final class ClientAuth extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public static final class ClientAuth extends
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ClientAuth)
       ClientAuthOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 29,
+        /* patch= */ 3,
+        /* suffix= */ "",
+        ClientAuth.class.getName());
+    }
     // Use ClientAuth.newBuilder() to construct.
-    private ClientAuth(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private ClientAuth(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private ClientAuth() {
@@ -2544,77 +2614,13 @@ private ClientAuth() {
       password_ = com.google.protobuf.ByteString.EMPTY;
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private ClientAuth(
-        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: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              username_ = s;
-              break;
-            }
-            case 18: {
-
-              password_ = input.readBytes();
-              break;
-            }
-            case 24: {
-              netReadTimeoutPresentCase_ = 3;
-              netReadTimeoutPresent_ = input.readInt32();
-              break;
-            }
-            case 32: {
-              netWriteTimeoutPresentCase_ = 4;
-              netWriteTimeoutPresent_ = input.readInt32();
-              break;
-            }
-            default: {
-              if (!parseUnknownFieldProto3(
-                  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 com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -2622,9 +2628,11 @@ private ClientAuth(
     }
 
     private int netReadTimeoutPresentCase_ = 0;
+    @SuppressWarnings("serial")
     private java.lang.Object netReadTimeoutPresent_;
     public enum NetReadTimeoutPresentCase
-        implements com.google.protobuf.Internal.EnumLite {
+        implements com.google.protobuf.Internal.EnumLite,
+            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
       NET_READ_TIMEOUT(3),
       NETREADTIMEOUTPRESENT_NOT_SET(0);
       private final int value;
@@ -2632,6 +2640,8 @@ private NetReadTimeoutPresentCase(int value) {
         this.value = value;
       }
       /**
+       * @param value The number of the enum to look for.
+       * @return The enum associated with the given number.
        * @deprecated Use {@link #forNumber(int)} instead.
        */
       @java.lang.Deprecated
@@ -2658,9 +2668,11 @@ public int getNumber() {
     }
 
     private int netWriteTimeoutPresentCase_ = 0;
+    @SuppressWarnings("serial")
     private java.lang.Object netWriteTimeoutPresent_;
     public enum NetWriteTimeoutPresentCase
-        implements com.google.protobuf.Internal.EnumLite {
+        implements com.google.protobuf.Internal.EnumLite,
+            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
       NET_WRITE_TIMEOUT(4),
       NETWRITETIMEOUTPRESENT_NOT_SET(0);
       private final int value;
@@ -2668,6 +2680,8 @@ private NetWriteTimeoutPresentCase(int value) {
         this.value = value;
       }
       /**
+       * @param value The number of the enum to look for.
+       * @return The enum associated with the given number.
        * @deprecated Use {@link #forNumber(int)} instead.
        */
       @java.lang.Deprecated
@@ -2694,10 +2708,13 @@ public int getNumber() {
     }
 
     public static final int USERNAME_FIELD_NUMBER = 1;
-    private volatile java.lang.Object username_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object username_ = "";
     /**
      * string username = 1;
+     * @return The username.
      */
+    @java.lang.Override
     public java.lang.String getUsername() {
       java.lang.Object ref = username_;
       if (ref instanceof java.lang.String) {
@@ -2712,7 +2729,9 @@ public java.lang.String getUsername() {
     }
     /**
      * string username = 1;
+     * @return The bytes for username.
      */
+    @java.lang.Override
     public com.google.protobuf.ByteString
         getUsernameBytes() {
       java.lang.Object ref = username_;
@@ -2728,14 +2747,16 @@ public java.lang.String getUsername() {
     }
 
     public static final int PASSWORD_FIELD_NUMBER = 2;
-    private com.google.protobuf.ByteString password_;
+    private com.google.protobuf.ByteString password_ = com.google.protobuf.ByteString.EMPTY;
     /**
      * 
      * hashed password with seeds from Handshake message
      * 
* * bytes password = 2; + * @return The password. */ + @java.lang.Override public com.google.protobuf.ByteString getPassword() { return password_; } @@ -2747,7 +2768,21 @@ public com.google.protobuf.ByteString getPassword() { *
* * int32 net_read_timeout = 3; + * @return Whether the netReadTimeout field is set. + */ + @java.lang.Override + public boolean hasNetReadTimeout() { + return netReadTimeoutPresentCase_ == 3; + } + /** + *
+     * in seconds
+     * 
+ * + * int32 net_read_timeout = 3; + * @return The netReadTimeout. */ + @java.lang.Override public int getNetReadTimeout() { if (netReadTimeoutPresentCase_ == 3) { return (java.lang.Integer) netReadTimeoutPresent_; @@ -2762,7 +2797,21 @@ public int getNetReadTimeout() { * * * int32 net_write_timeout = 4; + * @return Whether the netWriteTimeout field is set. */ + @java.lang.Override + public boolean hasNetWriteTimeout() { + return netWriteTimeoutPresentCase_ == 4; + } + /** + *
+     * in seconds
+     * 
+ * + * int32 net_write_timeout = 4; + * @return The netWriteTimeout. + */ + @java.lang.Override public int getNetWriteTimeout() { if (netWriteTimeoutPresentCase_ == 4) { return (java.lang.Integer) netWriteTimeoutPresent_; @@ -2784,8 +2833,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getUsernameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, username_); } if (!password_.isEmpty()) { output.writeBytes(2, password_); @@ -2798,7 +2847,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt32( 4, (int)((java.lang.Integer) netWriteTimeoutPresent_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2807,8 +2856,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getUsernameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, username_); } if (!password_.isEmpty()) { size += com.google.protobuf.CodedOutputStream @@ -2824,7 +2873,7 @@ public int getSerializedSize() { .computeInt32Size( 4, (int)((java.lang.Integer) netWriteTimeoutPresent_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2839,35 +2888,30 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth other = (com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth) obj; - boolean result = true; - result = result && getUsername() - .equals(other.getUsername()); - result = result && getPassword() - .equals(other.getPassword()); - result = result && getNetReadTimeoutPresentCase().equals( - other.getNetReadTimeoutPresentCase()); - if (!result) return false; + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getPassword() + .equals(other.getPassword())) return false; + if (!getNetReadTimeoutPresentCase().equals(other.getNetReadTimeoutPresentCase())) return false; switch (netReadTimeoutPresentCase_) { case 3: - result = result && (getNetReadTimeout() - == other.getNetReadTimeout()); + if (getNetReadTimeout() + != other.getNetReadTimeout()) return false; break; case 0: default: } - result = result && getNetWriteTimeoutPresentCase().equals( - other.getNetWriteTimeoutPresentCase()); - if (!result) return false; + if (!getNetWriteTimeoutPresentCase().equals(other.getNetWriteTimeoutPresentCase())) return false; switch (netWriteTimeoutPresentCase_) { case 4: - result = result && (getNetWriteTimeout() - == other.getNetWriteTimeout()); + if (getNetWriteTimeout() + != other.getNetWriteTimeout()) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -2897,7 +2941,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2936,39 +2980,41 @@ public static com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth parseFrom( } public static com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2988,7 +3034,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3000,7 +3046,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAuth} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.ClientAuth) com.alibaba.otter.canal.protocol.AdminPacket.ClientAuthOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -3009,7 +3055,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3018,26 +3064,20 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; username_ = ""; - password_ = com.google.protobuf.ByteString.EMPTY; - netReadTimeoutPresentCase_ = 0; netReadTimeoutPresent_ = null; netWriteTimeoutPresentCase_ = 0; @@ -3068,52 +3108,29 @@ public com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth build() { @java.lang.Override public com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth buildPartial() { com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth result = new com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth(this); - result.username_ = username_; - result.password_ = password_; - if (netReadTimeoutPresentCase_ == 3) { - result.netReadTimeoutPresent_ = netReadTimeoutPresent_; - } - if (netWriteTimeoutPresentCase_ == 4) { - result.netWriteTimeoutPresent_ = netWriteTimeoutPresent_; - } - result.netReadTimeoutPresentCase_ = netReadTimeoutPresentCase_; - result.netWriteTimeoutPresentCase_ = netWriteTimeoutPresentCase_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.password_ = password_; + } } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth result) { + result.netReadTimeoutPresentCase_ = netReadTimeoutPresentCase_; + result.netReadTimeoutPresent_ = this.netReadTimeoutPresent_; + result.netWriteTimeoutPresentCase_ = netWriteTimeoutPresentCase_; + result.netWriteTimeoutPresent_ = this.netWriteTimeoutPresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth) { @@ -3128,6 +3145,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth if (other == com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth.getDefaultInstance()) return this; if (!other.getUsername().isEmpty()) { username_ = other.username_; + bitField0_ |= 0x00000001; onChanged(); } if (other.getPassword() != com.google.protobuf.ByteString.EMPTY) { @@ -3151,7 +3169,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3166,17 +3184,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + password_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + netReadTimeoutPresent_ = input.readInt32(); + netReadTimeoutPresentCase_ = 3; + break; + } // case 24 + case 32: { + netWriteTimeoutPresent_ = input.readInt32(); + netWriteTimeoutPresentCase_ = 4; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.AdminPacket.ClientAuth) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int netReadTimeoutPresentCase_ = 0; @@ -3209,10 +3260,12 @@ public Builder clearNetWriteTimeoutPresent() { return this; } + private int bitField0_; private java.lang.Object username_ = ""; /** * string username = 1; + * @return The username. */ public java.lang.String getUsername() { java.lang.Object ref = username_; @@ -3228,6 +3281,7 @@ public java.lang.String getUsername() { } /** * string username = 1; + * @return The bytes for username. */ public com.google.protobuf.ByteString getUsernameBytes() { @@ -3244,37 +3298,38 @@ public java.lang.String getUsername() { } /** * string username = 1; + * @param value The username to set. + * @return This builder for chaining. */ public Builder setUsername( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } username_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** * string username = 1; + * @return This builder for chaining. */ public Builder clearUsername() { - username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string username = 1; + * @param value The bytes for username to set. + * @return This builder for chaining. */ public Builder setUsernameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); username_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3286,7 +3341,9 @@ public Builder setUsernameBytes( * * * bytes password = 2; + * @return The password. */ + @java.lang.Override public com.google.protobuf.ByteString getPassword() { return password_; } @@ -3296,13 +3353,13 @@ public com.google.protobuf.ByteString getPassword() { * * * bytes password = 2; + * @param value The password to set. + * @return This builder for chaining. */ public Builder setPassword(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } password_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3312,9 +3369,10 @@ public Builder setPassword(com.google.protobuf.ByteString value) { * * * bytes password = 2; + * @return This builder for chaining. */ public Builder clearPassword() { - + bitField0_ = (bitField0_ & ~0x00000002); password_ = getDefaultInstance().getPassword(); onChanged(); return this; @@ -3326,6 +3384,18 @@ public Builder clearPassword() { * * * int32 net_read_timeout = 3; + * @return Whether the netReadTimeout field is set. + */ + public boolean hasNetReadTimeout() { + return netReadTimeoutPresentCase_ == 3; + } + /** + *
+       * in seconds
+       * 
+ * + * int32 net_read_timeout = 3; + * @return The netReadTimeout. */ public int getNetReadTimeout() { if (netReadTimeoutPresentCase_ == 3) { @@ -3339,8 +3409,11 @@ public int getNetReadTimeout() { * * * int32 net_read_timeout = 3; + * @param value The netReadTimeout to set. + * @return This builder for chaining. */ public Builder setNetReadTimeout(int value) { + netReadTimeoutPresentCase_ = 3; netReadTimeoutPresent_ = value; onChanged(); @@ -3352,6 +3425,7 @@ public Builder setNetReadTimeout(int value) { * * * int32 net_read_timeout = 3; + * @return This builder for chaining. */ public Builder clearNetReadTimeout() { if (netReadTimeoutPresentCase_ == 3) { @@ -3368,6 +3442,18 @@ public Builder clearNetReadTimeout() { * * * int32 net_write_timeout = 4; + * @return Whether the netWriteTimeout field is set. + */ + public boolean hasNetWriteTimeout() { + return netWriteTimeoutPresentCase_ == 4; + } + /** + *
+       * in seconds
+       * 
+ * + * int32 net_write_timeout = 4; + * @return The netWriteTimeout. */ public int getNetWriteTimeout() { if (netWriteTimeoutPresentCase_ == 4) { @@ -3381,8 +3467,11 @@ public int getNetWriteTimeout() { * * * int32 net_write_timeout = 4; + * @param value The netWriteTimeout to set. + * @return This builder for chaining. */ public Builder setNetWriteTimeout(int value) { + netWriteTimeoutPresentCase_ = 4; netWriteTimeoutPresent_ = value; onChanged(); @@ -3394,6 +3483,7 @@ public Builder setNetWriteTimeout(int value) { * * * int32 net_write_timeout = 4; + * @return This builder for chaining. */ public Builder clearNetWriteTimeout() { if (netWriteTimeoutPresentCase_ == 4) { @@ -3403,18 +3493,6 @@ public Builder clearNetWriteTimeout() { } return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.ClientAuth) } @@ -3436,7 +3514,18 @@ public ClientAuth parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ClientAuth(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3466,6 +3555,7 @@ public interface ServerAdminOrBuilder extends * * * string action = 1; + * @return The action. */ java.lang.String getAction(); /** @@ -3474,6 +3564,7 @@ public interface ServerAdminOrBuilder extends * * * string action = 1; + * @return The bytes for action. */ com.google.protobuf.ByteString getActionBytes(); @@ -3481,75 +3572,35 @@ public interface ServerAdminOrBuilder extends /** * Protobuf type {@code com.alibaba.otter.canal.protocol.ServerAdmin} */ - public static final class ServerAdmin extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class ServerAdmin extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ServerAdmin) ServerAdminOrBuilder { private static final long serialVersionUID = 0L; - // Use ServerAdmin.newBuilder() to construct. - private ServerAdmin(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ServerAdmin() { - action_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ServerAdmin( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - - action_ = s; - break; - } - default: { - if (!parseUnknownFieldProto3( - 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(); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + ServerAdmin.class.getName()); } + // Use ServerAdmin.newBuilder() to construct. + private ServerAdmin(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ServerAdmin() { + action_ = ""; + } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_ServerAdmin_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_ServerAdmin_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3557,14 +3608,17 @@ private ServerAdmin( } public static final int ACTION_FIELD_NUMBER = 1; - private volatile java.lang.Object action_; + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; /** *
      * check/start/stop/restart/list
      * 
* * string action = 1; + * @return The action. */ + @java.lang.Override public java.lang.String getAction() { java.lang.Object ref = action_; if (ref instanceof java.lang.String) { @@ -3583,7 +3637,9 @@ public java.lang.String getAction() { * * * string action = 1; + * @return The bytes for action. */ + @java.lang.Override public com.google.protobuf.ByteString getActionBytes() { java.lang.Object ref = action_; @@ -3612,10 +3668,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getActionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, action_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, action_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3624,10 +3680,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getActionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, action_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, action_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3642,11 +3698,10 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin other = (com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin) obj; - boolean result = true; - result = result && getAction() - .equals(other.getAction()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getAction() + .equals(other.getAction())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -3658,7 +3713,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + getAction().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3697,39 +3752,41 @@ public static com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin parseFrom } public static com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -3749,7 +3806,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3757,7 +3814,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.ServerAdmin} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.ServerAdmin) com.alibaba.otter.canal.protocol.AdminPacket.ServerAdminOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -3766,7 +3823,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_ServerAdmin_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3775,24 +3832,19 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; action_ = ""; - return this; } @@ -3819,43 +3871,18 @@ public com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin build() { @java.lang.Override public com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin buildPartial() { com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin result = new com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin(this); - result.action_ = action_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.action_ = action_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin) { @@ -3870,9 +3897,10 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmi if (other == com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin.getDefaultInstance()) return this; if (!other.getAction().isEmpty()) { action_ = other.action_; + bitField0_ |= 0x00000001; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3887,19 +3915,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.AdminPacket.ServerAdmin) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private java.lang.Object action_ = ""; /** @@ -3908,6 +3955,7 @@ public Builder mergeFrom( * * * string action = 1; + * @return The action. */ public java.lang.String getAction() { java.lang.Object ref = action_; @@ -3927,6 +3975,7 @@ public java.lang.String getAction() { * * * string action = 1; + * @return The bytes for action. */ public com.google.protobuf.ByteString getActionBytes() { @@ -3947,14 +3996,14 @@ public java.lang.String getAction() { * * * string action = 1; + * @param value The action to set. + * @return This builder for chaining. */ public Builder setAction( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } action_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3964,10 +4013,11 @@ public Builder setAction( * * * string action = 1; + * @return This builder for chaining. */ public Builder clearAction() { - action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -3977,30 +4027,18 @@ public Builder clearAction() { * * * string action = 1; + * @param value The bytes for action to set. + * @return This builder for chaining. */ public Builder setActionBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); action_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.ServerAdmin) } @@ -4022,7 +4060,18 @@ public ServerAdmin parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServerAdmin(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4048,10 +4097,12 @@ public interface InstanceAdminOrBuilder extends /** * string destination = 1; + * @return The destination. */ java.lang.String getDestination(); /** * string destination = 1; + * @return The bytes for destination. */ com.google.protobuf.ByteString getDestinationBytes(); @@ -4062,6 +4113,7 @@ public interface InstanceAdminOrBuilder extends * * * string action = 2; + * @return The action. */ java.lang.String getAction(); /** @@ -4070,6 +4122,7 @@ public interface InstanceAdminOrBuilder extends * * * string action = 2; + * @return The bytes for action. */ com.google.protobuf.ByteString getActionBytes(); @@ -4077,13 +4130,22 @@ public interface InstanceAdminOrBuilder extends /** * Protobuf type {@code com.alibaba.otter.canal.protocol.InstanceAdmin} */ - public static final class InstanceAdmin extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class InstanceAdmin extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.InstanceAdmin) InstanceAdminOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + InstanceAdmin.class.getName()); + } // Use InstanceAdmin.newBuilder() to construct. - private InstanceAdmin(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private InstanceAdmin(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private InstanceAdmin() { @@ -4091,68 +4153,13 @@ private InstanceAdmin() { action_ = ""; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InstanceAdmin( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - - destination_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - action_ = s; - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_InstanceAdmin_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_InstanceAdmin_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -4160,10 +4167,13 @@ private InstanceAdmin( } public static final int DESTINATION_FIELD_NUMBER = 1; - private volatile java.lang.Object destination_; + @SuppressWarnings("serial") + private volatile java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ + @java.lang.Override public java.lang.String getDestination() { java.lang.Object ref = destination_; if (ref instanceof java.lang.String) { @@ -4178,7 +4188,9 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ + @java.lang.Override public com.google.protobuf.ByteString getDestinationBytes() { java.lang.Object ref = destination_; @@ -4194,14 +4206,17 @@ public java.lang.String getDestination() { } public static final int ACTION_FIELD_NUMBER = 2; - private volatile java.lang.Object action_; + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; /** *
      * check/start/stop/reload
      * 
* * string action = 2; + * @return The action. */ + @java.lang.Override public java.lang.String getAction() { java.lang.Object ref = action_; if (ref instanceof java.lang.String) { @@ -4220,7 +4235,9 @@ public java.lang.String getAction() { * * * string action = 2; + * @return The bytes for action. */ + @java.lang.Override public com.google.protobuf.ByteString getActionBytes() { java.lang.Object ref = action_; @@ -4249,13 +4266,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDestinationBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, destination_); } - if (!getActionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, action_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4264,13 +4281,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getDestinationBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, destination_); } - if (!getActionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, action_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4285,13 +4302,12 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin other = (com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin) obj; - boolean result = true; - result = result && getDestination() - .equals(other.getDestination()); - result = result && getAction() - .equals(other.getAction()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getDestination() + .equals(other.getDestination())) return false; + if (!getAction() + .equals(other.getAction())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -4305,7 +4321,7 @@ public int hashCode() { hash = (53 * hash) + getDestination().hashCode(); hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + getAction().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4344,39 +4360,41 @@ public static com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin parseFr } public static com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -4396,7 +4414,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -4404,7 +4422,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.InstanceAdmin} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.InstanceAdmin) com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdminOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -4413,7 +4431,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_InstanceAdmin_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -4422,26 +4440,20 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; destination_ = ""; - action_ = ""; - return this; } @@ -4468,44 +4480,21 @@ public com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin build() { @java.lang.Override public com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin buildPartial() { com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin result = new com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin(this); - result.destination_ = destination_; - result.action_ = action_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.destination_ = destination_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.action_ = action_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin) { @@ -4520,13 +4509,15 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.InstanceAd if (other == com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin.getDefaultInstance()) return this; if (!other.getDestination().isEmpty()) { destination_ = other.destination_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getAction().isEmpty()) { action_ = other.action_; + bitField0_ |= 0x00000002; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4541,23 +4532,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + destination_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.AdminPacket.InstanceAdmin) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ public java.lang.String getDestination() { java.lang.Object ref = destination_; @@ -4573,6 +4589,7 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ public com.google.protobuf.ByteString getDestinationBytes() { @@ -4589,37 +4606,38 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @param value The destination to set. + * @return This builder for chaining. */ public Builder setDestination( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** * string destination = 1; + * @return This builder for chaining. */ public Builder clearDestination() { - destination_ = getDefaultInstance().getDestination(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string destination = 1; + * @param value The bytes for destination to set. + * @return This builder for chaining. */ public Builder setDestinationBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -4631,6 +4649,7 @@ public Builder setDestinationBytes( * * * string action = 2; + * @return The action. */ public java.lang.String getAction() { java.lang.Object ref = action_; @@ -4650,6 +4669,7 @@ public java.lang.String getAction() { * * * string action = 2; + * @return The bytes for action. */ public com.google.protobuf.ByteString getActionBytes() { @@ -4670,14 +4690,14 @@ public java.lang.String getAction() { * * * string action = 2; + * @param value The action to set. + * @return This builder for chaining. */ public Builder setAction( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } action_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -4687,10 +4707,11 @@ public Builder setAction( * * * string action = 2; + * @return This builder for chaining. */ public Builder clearAction() { - action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -4700,30 +4721,18 @@ public Builder clearAction() { * * * string action = 2; + * @param value The bytes for action to set. + * @return This builder for chaining. */ public Builder setActionBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); action_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.InstanceAdmin) } @@ -4745,7 +4754,18 @@ public InstanceAdmin parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceAdmin(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4775,6 +4795,7 @@ public interface LogAdminOrBuilder extends * * * string type = 1; + * @return The type. */ java.lang.String getType(); /** @@ -4783,36 +4804,53 @@ public interface LogAdminOrBuilder extends * * * string type = 1; + * @return The bytes for type. */ com.google.protobuf.ByteString getTypeBytes(); /** * string action = 2; + * @return The action. */ java.lang.String getAction(); /** * string action = 2; + * @return The bytes for action. */ com.google.protobuf.ByteString getActionBytes(); /** * string destination = 3; + * @return Whether the destination field is set. + */ + boolean hasDestination(); + /** + * string destination = 3; + * @return The destination. */ java.lang.String getDestination(); /** * string destination = 3; + * @return The bytes for destination. */ com.google.protobuf.ByteString getDestinationBytes(); /** * string file = 4; + * @return Whether the file field is set. + */ + boolean hasFile(); + /** + * string file = 4; + * @return The file. */ java.lang.String getFile(); /** * string file = 4; + * @return The bytes for file. */ com.google.protobuf.ByteString getFileBytes(); @@ -4823,25 +4861,44 @@ public interface LogAdminOrBuilder extends * * * int32 count = 5; + * @return Whether the count field is set. + */ + boolean hasCount(); + /** + *
+     * 默认tail 100行,最大不超过4MB
+     * 
+ * + * int32 count = 5; + * @return The count. */ int getCount(); - public com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin.DestinationPresentCase getDestinationPresentCase(); + com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin.DestinationPresentCase getDestinationPresentCase(); - public com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin.FilePresentCase getFilePresentCase(); + com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin.FilePresentCase getFilePresentCase(); - public com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin.CountPresentCase getCountPresentCase(); + com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin.CountPresentCase getCountPresentCase(); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.LogAdmin} */ - public static final class LogAdmin extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class LogAdmin extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.LogAdmin) LogAdminOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + LogAdmin.class.getName()); + } // Use LogAdmin.newBuilder() to construct. - private LogAdmin(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private LogAdmin(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private LogAdmin() { @@ -4849,85 +4906,13 @@ private LogAdmin() { action_ = ""; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LogAdmin( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - action_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - destinationPresentCase_ = 3; - destinationPresent_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - filePresentCase_ = 4; - filePresent_ = s; - break; - } - case 40: { - countPresentCase_ = 5; - countPresent_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_LogAdmin_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_LogAdmin_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -4935,9 +4920,11 @@ private LogAdmin( } private int destinationPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object destinationPresent_; public enum DestinationPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { DESTINATION(3), DESTINATIONPRESENT_NOT_SET(0); private final int value; @@ -4945,6 +4932,8 @@ private DestinationPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -4971,9 +4960,11 @@ public int getNumber() { } private int filePresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object filePresent_; public enum FilePresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { FILE(4), FILEPRESENT_NOT_SET(0); private final int value; @@ -4981,6 +4972,8 @@ private FilePresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -5007,9 +5000,11 @@ public int getNumber() { } private int countPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object countPresent_; public enum CountPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { COUNT(5), COUNTPRESENT_NOT_SET(0); private final int value; @@ -5017,6 +5012,8 @@ private CountPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -5043,14 +5040,17 @@ public int getNumber() { } public static final int TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object type_; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; /** *
      * canal/instance
      * 
* * string type = 1; + * @return The type. */ + @java.lang.Override public java.lang.String getType() { java.lang.Object ref = type_; if (ref instanceof java.lang.String) { @@ -5069,7 +5069,9 @@ public java.lang.String getType() { * * * string type = 1; + * @return The bytes for type. */ + @java.lang.Override public com.google.protobuf.ByteString getTypeBytes() { java.lang.Object ref = type_; @@ -5085,10 +5087,13 @@ public java.lang.String getType() { } public static final int ACTION_FIELD_NUMBER = 2; - private volatile java.lang.Object action_; + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; /** * string action = 2; + * @return The action. */ + @java.lang.Override public java.lang.String getAction() { java.lang.Object ref = action_; if (ref instanceof java.lang.String) { @@ -5103,7 +5108,9 @@ public java.lang.String getAction() { } /** * string action = 2; + * @return The bytes for action. */ + @java.lang.Override public com.google.protobuf.ByteString getActionBytes() { java.lang.Object ref = action_; @@ -5121,6 +5128,14 @@ public java.lang.String getAction() { public static final int DESTINATION_FIELD_NUMBER = 3; /** * string destination = 3; + * @return Whether the destination field is set. + */ + public boolean hasDestination() { + return destinationPresentCase_ == 3; + } + /** + * string destination = 3; + * @return The destination. */ public java.lang.String getDestination() { java.lang.Object ref = ""; @@ -5141,6 +5156,7 @@ public java.lang.String getDestination() { } /** * string destination = 3; + * @return The bytes for destination. */ public com.google.protobuf.ByteString getDestinationBytes() { @@ -5164,6 +5180,14 @@ public java.lang.String getDestination() { public static final int FILE_FIELD_NUMBER = 4; /** * string file = 4; + * @return Whether the file field is set. + */ + public boolean hasFile() { + return filePresentCase_ == 4; + } + /** + * string file = 4; + * @return The file. */ public java.lang.String getFile() { java.lang.Object ref = ""; @@ -5184,6 +5208,7 @@ public java.lang.String getFile() { } /** * string file = 4; + * @return The bytes for file. */ public com.google.protobuf.ByteString getFileBytes() { @@ -5211,7 +5236,21 @@ public java.lang.String getFile() { * * * int32 count = 5; + * @return Whether the count field is set. + */ + @java.lang.Override + public boolean hasCount() { + return countPresentCase_ == 5; + } + /** + *
+     * 默认tail 100行,最大不超过4MB
+     * 
+ * + * int32 count = 5; + * @return The count. */ + @java.lang.Override public int getCount() { if (countPresentCase_ == 5) { return (java.lang.Integer) countPresent_; @@ -5233,23 +5272,23 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, type_); } - if (!getActionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, action_); } if (destinationPresentCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, destinationPresent_); + com.google.protobuf.GeneratedMessage.writeString(output, 3, destinationPresent_); } if (filePresentCase_ == 4) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filePresent_); + com.google.protobuf.GeneratedMessage.writeString(output, 4, filePresent_); } if (countPresentCase_ == 5) { output.writeInt32( 5, (int)((java.lang.Integer) countPresent_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5258,24 +5297,24 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_); } - if (!getActionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, action_); } if (destinationPresentCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, destinationPresent_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, destinationPresent_); } if (filePresentCase_ == 4) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filePresent_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filePresent_); } if (countPresentCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeInt32Size( 5, (int)((java.lang.Integer) countPresent_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5290,46 +5329,39 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin other = (com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin) obj; - boolean result = true; - result = result && getType() - .equals(other.getType()); - result = result && getAction() - .equals(other.getAction()); - result = result && getDestinationPresentCase().equals( - other.getDestinationPresentCase()); - if (!result) return false; + if (!getType() + .equals(other.getType())) return false; + if (!getAction() + .equals(other.getAction())) return false; + if (!getDestinationPresentCase().equals(other.getDestinationPresentCase())) return false; switch (destinationPresentCase_) { case 3: - result = result && getDestination() - .equals(other.getDestination()); + if (!getDestination() + .equals(other.getDestination())) return false; break; case 0: default: } - result = result && getFilePresentCase().equals( - other.getFilePresentCase()); - if (!result) return false; + if (!getFilePresentCase().equals(other.getFilePresentCase())) return false; switch (filePresentCase_) { case 4: - result = result && getFile() - .equals(other.getFile()); + if (!getFile() + .equals(other.getFile())) return false; break; case 0: default: } - result = result && getCountPresentCase().equals( - other.getCountPresentCase()); - if (!result) return false; + if (!getCountPresentCase().equals(other.getCountPresentCase())) return false; switch (countPresentCase_) { case 5: - result = result && (getCount() - == other.getCount()); + if (getCount() + != other.getCount()) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -5367,7 +5399,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5406,39 +5438,41 @@ public static com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin parseFrom( } public static com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -5458,7 +5492,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -5466,7 +5500,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.LogAdmin} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.LogAdmin) com.alibaba.otter.canal.protocol.AdminPacket.LogAdminOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -5475,7 +5509,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.AdminPacket.internal_static_com_alibaba_otter_canal_protocol_LogAdmin_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -5484,26 +5518,20 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; type_ = ""; - action_ = ""; - destinationPresentCase_ = 0; destinationPresent_ = null; filePresentCase_ = 0; @@ -5536,56 +5564,31 @@ public com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin build() { @java.lang.Override public com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin buildPartial() { com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin result = new com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin(this); - result.type_ = type_; - result.action_ = action_; - if (destinationPresentCase_ == 3) { - result.destinationPresent_ = destinationPresent_; - } - if (filePresentCase_ == 4) { - result.filePresent_ = filePresent_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; } - if (countPresentCase_ == 5) { - result.countPresent_ = countPresent_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.action_ = action_; } + } + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin result) { result.destinationPresentCase_ = destinationPresentCase_; + result.destinationPresent_ = this.destinationPresent_; result.filePresentCase_ = filePresentCase_; + result.filePresent_ = this.filePresent_; result.countPresentCase_ = countPresentCase_; - onBuilt(); - return result; + result.countPresent_ = this.countPresent_; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin) { @@ -5600,10 +5603,12 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin o if (other == com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin.getDefaultInstance()) return this; if (!other.getType().isEmpty()) { type_ = other.type_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getAction().isEmpty()) { action_ = other.action_; + bitField0_ |= 0x00000002; onChanged(); } switch (other.getDestinationPresentCase()) { @@ -5637,7 +5642,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin o break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5652,17 +5657,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + destinationPresentCase_ = 3; + destinationPresent_ = s; + break; + } // case 26 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + filePresentCase_ = 4; + filePresent_ = s; + break; + } // case 34 + case 40: { + countPresent_ = input.readInt32(); + countPresentCase_ = 5; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int destinationPresentCase_ = 0; @@ -5710,6 +5755,7 @@ public Builder clearCountPresent() { return this; } + private int bitField0_; private java.lang.Object type_ = ""; /** @@ -5718,6 +5764,7 @@ public Builder clearCountPresent() { * * * string type = 1; + * @return The type. */ public java.lang.String getType() { java.lang.Object ref = type_; @@ -5737,6 +5784,7 @@ public java.lang.String getType() { * * * string type = 1; + * @return The bytes for type. */ public com.google.protobuf.ByteString getTypeBytes() { @@ -5757,14 +5805,14 @@ public java.lang.String getType() { * * * string type = 1; + * @param value The type to set. + * @return This builder for chaining. */ public Builder setType( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } type_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -5774,10 +5822,11 @@ public Builder setType( * * * string type = 1; + * @return This builder for chaining. */ public Builder clearType() { - type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -5787,15 +5836,15 @@ public Builder clearType() { * * * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. */ public Builder setTypeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); type_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -5803,6 +5852,7 @@ public Builder setTypeBytes( private java.lang.Object action_ = ""; /** * string action = 2; + * @return The action. */ public java.lang.String getAction() { java.lang.Object ref = action_; @@ -5818,6 +5868,7 @@ public java.lang.String getAction() { } /** * string action = 2; + * @return The bytes for action. */ public com.google.protobuf.ByteString getActionBytes() { @@ -5834,44 +5885,55 @@ public java.lang.String getAction() { } /** * string action = 2; + * @param value The action to set. + * @return This builder for chaining. */ public Builder setAction( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } action_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** * string action = 2; + * @return This builder for chaining. */ public Builder clearAction() { - action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * string action = 2; + * @param value The bytes for action to set. + * @return This builder for chaining. */ public Builder setActionBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); action_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** * string destination = 3; + * @return Whether the destination field is set. + */ + @java.lang.Override + public boolean hasDestination() { + return destinationPresentCase_ == 3; + } + /** + * string destination = 3; + * @return The destination. */ + @java.lang.Override public java.lang.String getDestination() { java.lang.Object ref = ""; if (destinationPresentCase_ == 3) { @@ -5891,7 +5953,9 @@ public java.lang.String getDestination() { } /** * string destination = 3; + * @return The bytes for destination. */ + @java.lang.Override public com.google.protobuf.ByteString getDestinationBytes() { java.lang.Object ref = ""; @@ -5912,19 +5976,20 @@ public java.lang.String getDestination() { } /** * string destination = 3; + * @param value The destination to set. + * @return This builder for chaining. */ public Builder setDestination( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - destinationPresentCase_ = 3; + if (value == null) { throw new NullPointerException(); } + destinationPresentCase_ = 3; destinationPresent_ = value; onChanged(); return this; } /** * string destination = 3; + * @return This builder for chaining. */ public Builder clearDestination() { if (destinationPresentCase_ == 3) { @@ -5936,13 +6001,13 @@ public Builder clearDestination() { } /** * string destination = 3; + * @param value The bytes for destination to set. + * @return This builder for chaining. */ public Builder setDestinationBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); destinationPresentCase_ = 3; destinationPresent_ = value; onChanged(); @@ -5951,7 +6016,17 @@ public Builder setDestinationBytes( /** * string file = 4; + * @return Whether the file field is set. + */ + @java.lang.Override + public boolean hasFile() { + return filePresentCase_ == 4; + } + /** + * string file = 4; + * @return The file. */ + @java.lang.Override public java.lang.String getFile() { java.lang.Object ref = ""; if (filePresentCase_ == 4) { @@ -5971,7 +6046,9 @@ public java.lang.String getFile() { } /** * string file = 4; + * @return The bytes for file. */ + @java.lang.Override public com.google.protobuf.ByteString getFileBytes() { java.lang.Object ref = ""; @@ -5992,19 +6069,20 @@ public java.lang.String getFile() { } /** * string file = 4; + * @param value The file to set. + * @return This builder for chaining. */ public Builder setFile( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - filePresentCase_ = 4; + if (value == null) { throw new NullPointerException(); } + filePresentCase_ = 4; filePresent_ = value; onChanged(); return this; } /** * string file = 4; + * @return This builder for chaining. */ public Builder clearFile() { if (filePresentCase_ == 4) { @@ -6016,13 +6094,13 @@ public Builder clearFile() { } /** * string file = 4; + * @param value The bytes for file to set. + * @return This builder for chaining. */ public Builder setFileBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); filePresentCase_ = 4; filePresent_ = value; onChanged(); @@ -6035,6 +6113,18 @@ public Builder setFileBytes( * * * int32 count = 5; + * @return Whether the count field is set. + */ + public boolean hasCount() { + return countPresentCase_ == 5; + } + /** + *
+       * 默认tail 100行,最大不超过4MB
+       * 
+ * + * int32 count = 5; + * @return The count. */ public int getCount() { if (countPresentCase_ == 5) { @@ -6048,8 +6138,11 @@ public int getCount() { * * * int32 count = 5; + * @param value The count to set. + * @return This builder for chaining. */ public Builder setCount(int value) { + countPresentCase_ = 5; countPresent_ = value; onChanged(); @@ -6061,6 +6154,7 @@ public Builder setCount(int value) { * * * int32 count = 5; + * @return This builder for chaining. */ public Builder clearCount() { if (countPresentCase_ == 5) { @@ -6070,18 +6164,6 @@ public Builder clearCount() { } return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.LogAdmin) } @@ -6103,7 +6185,18 @@ public LogAdmin parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LogAdmin(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6126,37 +6219,37 @@ public com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin getDefaultInstanceF private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_ServerAdmin_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_ServerAdmin_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_InstanceAdmin_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_InstanceAdmin_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_LogAdmin_descriptor; private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_LogAdmin_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor @@ -6167,86 +6260,80 @@ public com.alibaba.otter.canal.protocol.AdminPacket.LogAdmin getDefaultInstanceF descriptor; static { java.lang.String[] descriptorData = { - "\n\023AdminProtocol.proto\022 com.alibaba.otter" + - ".canal.protocol\"\250\001\n\006Packet\022\026\n\014magic_numb" + - "er\030\001 \001(\005H\000\022\021\n\007version\030\002 \001(\005H\001\022:\n\004type\030\003 " + - "\001(\0162,.com.alibaba.otter.canal.protocol.P" + - "acketType\022\014\n\004body\030\004 \001(\014B\026\n\024magic_number_" + - "presentB\021\n\017version_present\"<\n\003Ack\022\016\n\004cod" + - "e\030\001 \001(\005H\000\022\017\n\007message\030\002 \001(\tB\024\n\022error_code" + - "_present\"^\n\tHandshake\022 \n\026communication_e" + - "ncoding\030\001 \001(\tH\000\022\r\n\005seeds\030\002 \001(\014B \n\036commun" + - "ication_encoding_present\"\242\001\n\nClientAuth\022" + - "\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\014\022\032\n\020n" + - "et_read_timeout\030\003 \001(\005H\000\022\033\n\021net_write_tim" + - "eout\030\004 \001(\005H\001B\032\n\030net_read_timeout_present" + - "B\033\n\031net_write_timeout_present\"\035\n\013ServerA" + - "dmin\022\016\n\006action\030\001 \001(\t\"4\n\rInstanceAdmin\022\023\n" + - "\013destination\030\001 \001(\t\022\016\n\006action\030\002 \001(\t\"\230\001\n\010L" + - "ogAdmin\022\014\n\004type\030\001 \001(\t\022\016\n\006action\030\002 \001(\t\022\025\n" + - "\013destination\030\003 \001(\tH\000\022\016\n\004file\030\004 \001(\tH\001\022\017\n\005" + - "count\030\005 \001(\005H\002B\025\n\023destination_presentB\016\n\014" + - "file_presentB\017\n\rcount_present*\202\001\n\nPacket" + - "Type\022\037\n\033PACKAGETYPECOMPATIBLEPROTO2\020\000\022\r\n" + - "\tHANDSHAKE\020\001\022\030\n\024CLIENTAUTHENTICATION\020\002\022\007" + - "\n\003ACK\020\003\022\n\n\006SERVER\020\004\022\014\n\010INSTANCE\020\005\022\007\n\003LOG" + - "\020\006B1\n com.alibaba.otter.canal.protocolB\013" + - "AdminPacketH\001b\006proto3" + "\n4com/alibaba/otter/canal/protocol/Admin" + + "Protocol.proto\022 com.alibaba.otter.canal." + + "protocol\"\250\001\n\006Packet\022\026\n\014magic_number\030\001 \001(" + + "\005H\000\022\021\n\007version\030\002 \001(\005H\001\022:\n\004type\030\003 \001(\0162,.c" + + "om.alibaba.otter.canal.protocol.PacketTy" + + "pe\022\014\n\004body\030\004 \001(\014B\026\n\024magic_number_present" + + "B\021\n\017version_present\"<\n\003Ack\022\016\n\004code\030\001 \001(\005" + + "H\000\022\017\n\007message\030\002 \001(\tB\024\n\022error_code_presen" + + "t\"^\n\tHandshake\022 \n\026communication_encoding" + + "\030\001 \001(\tH\000\022\r\n\005seeds\030\002 \001(\014B \n\036communication" + + "_encoding_present\"\242\001\n\nClientAuth\022\020\n\010user" + + "name\030\001 \001(\t\022\020\n\010password\030\002 \001(\014\022\032\n\020net_read" + + "_timeout\030\003 \001(\005H\000\022\033\n\021net_write_timeout\030\004 " + + "\001(\005H\001B\032\n\030net_read_timeout_presentB\033\n\031net" + + "_write_timeout_present\"\035\n\013ServerAdmin\022\016\n" + + "\006action\030\001 \001(\t\"4\n\rInstanceAdmin\022\023\n\013destin" + + "ation\030\001 \001(\t\022\016\n\006action\030\002 \001(\t\"\230\001\n\010LogAdmin" + + "\022\014\n\004type\030\001 \001(\t\022\016\n\006action\030\002 \001(\t\022\025\n\013destin" + + "ation\030\003 \001(\tH\000\022\016\n\004file\030\004 \001(\tH\001\022\017\n\005count\030\005" + + " \001(\005H\002B\025\n\023destination_presentB\016\n\014file_pr" + + "esentB\017\n\rcount_present*\202\001\n\nPacketType\022\037\n" + + "\033PACKAGETYPECOMPATIBLEPROTO2\020\000\022\r\n\tHANDSH" + + "AKE\020\001\022\030\n\024CLIENTAUTHENTICATION\020\002\022\007\n\003ACK\020\003" + + "\022\n\n\006SERVER\020\004\022\014\n\010INSTANCE\020\005\022\007\n\003LOG\020\006B1\n c" + + "om.alibaba.otter.canal.protocolB\013AdminPa" + + "cketH\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 + descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); + }); internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor, new java.lang.String[] { "MagicNumber", "Version", "Type", "Body", "MagicNumberPresent", "VersionPresent", }); internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor, new java.lang.String[] { "Code", "Message", "ErrorCodePresent", }); internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor, new java.lang.String[] { "CommunicationEncoding", "Seeds", "CommunicationEncodingPresent", }); internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor, new java.lang.String[] { "Username", "Password", "NetReadTimeout", "NetWriteTimeout", "NetReadTimeoutPresent", "NetWriteTimeoutPresent", }); internal_static_com_alibaba_otter_canal_protocol_ServerAdmin_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_com_alibaba_otter_canal_protocol_ServerAdmin_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_ServerAdmin_descriptor, new java.lang.String[] { "Action", }); internal_static_com_alibaba_otter_canal_protocol_InstanceAdmin_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_com_alibaba_otter_canal_protocol_InstanceAdmin_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_InstanceAdmin_descriptor, new java.lang.String[] { "Destination", "Action", }); internal_static_com_alibaba_otter_canal_protocol_LogAdmin_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_com_alibaba_otter_canal_protocol_LogAdmin_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_LogAdmin_descriptor, new java.lang.String[] { "Type", "Action", "Destination", "File", "Count", "DestinationPresent", "FilePresent", "CountPresent", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java index 0ff7d1abfd..aefd5c9a5a 100644 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java @@ -1,48 +1,83 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: EntryProtocol.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: com/alibaba/otter/canal/protocol/EntryProtocol.proto +// Protobuf Java Version: 4.29.3 package com.alibaba.otter.canal.protocol; public final class CanalEntry { private CanalEntry() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + CanalEntry.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); } /** - * Protobuf enum {@code com.alibaba.otter.canal.protocol.EntryType} - * *
-   **打散后的事件类型,主要用于标识事务的开始,变更数据,结束*
+   * *打散后的事件类型,主要用于标识事务的开始,变更数据,结束*
    * 
+ * + * Protobuf enum {@code com.alibaba.otter.canal.protocol.EntryType} */ public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { + /** + * ENTRYTYPECOMPATIBLEPROTO2 = 0; + */ + ENTRYTYPECOMPATIBLEPROTO2(0), /** * TRANSACTIONBEGIN = 1; */ - TRANSACTIONBEGIN(0, 1), + TRANSACTIONBEGIN(1), /** * ROWDATA = 2; */ - ROWDATA(1, 2), + ROWDATA(2), /** * TRANSACTIONEND = 3; */ - TRANSACTIONEND(2, 3), + TRANSACTIONEND(3), /** - * HEARTBEAT = 4; - * *
-     ** 心跳类型,内部使用,外部暂不可见,可忽略 *
+     * * 心跳类型,内部使用,外部暂不可见,可忽略 *
      * 
+ * + * HEARTBEAT = 4; */ - HEARTBEAT(3, 4), + HEARTBEAT(4), /** * GTIDLOG = 5; */ - GTIDLOG(4, 5), + GTIDLOG(5), + UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + EntryType.class.getName()); + } + /** + * ENTRYTYPECOMPATIBLEPROTO2 = 0; + */ + public static final int ENTRYTYPECOMPATIBLEPROTO2_VALUE = 0; /** * TRANSACTIONBEGIN = 1; */ @@ -56,11 +91,11 @@ public enum EntryType */ public static final int TRANSACTIONEND_VALUE = 3; /** - * HEARTBEAT = 4; - * *
-     ** 心跳类型,内部使用,外部暂不可见,可忽略 *
+     * * 心跳类型,内部使用,外部暂不可见,可忽略 *
      * 
+ * + * HEARTBEAT = 4; */ public static final int HEARTBEAT_VALUE = 4; /** @@ -69,10 +104,31 @@ public enum EntryType public static final int GTIDLOG_VALUE = 5; - public final int getNumber() { return value; } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated public static EntryType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EntryType forNumber(int value) { switch (value) { + case 0: return ENTRYTYPECOMPATIBLEPROTO2; case 1: return TRANSACTIONBEGIN; case 2: return ROWDATA; case 3: return TRANSACTIONEND; @@ -86,17 +142,21 @@ public static EntryType valueOf(int value) { internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = + private static final com.google.protobuf.Internal.EnumLiteMap< + EntryType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public EntryType findValueByNumber(int number) { - return EntryType.valueOf(number); + return EntryType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(index); + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { @@ -104,7 +164,7 @@ public EntryType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return CanalEntry.getDescriptor().getEnumTypes().get(0); + return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(0); } private static final EntryType[] VALUES = values(); @@ -112,17 +172,18 @@ public EntryType findValueByNumber(int number) { public static EntryType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( + throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } return VALUES[desc.getIndex()]; } - private final int index; private final int value; - private EntryType(int index, int value) { - this.index = index; + private EntryType(int value) { this.value = value; } @@ -130,88 +191,106 @@ private EntryType(int index, int value) { } /** - * Protobuf enum {@code com.alibaba.otter.canal.protocol.EventType} - * *
-   ** 事件类型 *
+   * * 事件类型 *
    * 
+ * + * Protobuf enum {@code com.alibaba.otter.canal.protocol.EventType} */ public enum EventType implements com.google.protobuf.ProtocolMessageEnum { + /** + * EVENTTYPECOMPATIBLEPROTO2 = 0; + */ + EVENTTYPECOMPATIBLEPROTO2(0), /** * INSERT = 1; */ - INSERT(0, 1), + INSERT(1), /** * UPDATE = 2; */ - UPDATE(1, 2), + UPDATE(2), /** * DELETE = 3; */ - DELETE(2, 3), + DELETE(3), /** * CREATE = 4; */ - CREATE(3, 4), + CREATE(4), /** * ALTER = 5; */ - ALTER(4, 5), + ALTER(5), /** * ERASE = 6; */ - ERASE(5, 6), + ERASE(6), /** * QUERY = 7; */ - QUERY(6, 7), + QUERY(7), /** * TRUNCATE = 8; */ - TRUNCATE(7, 8), + TRUNCATE(8), /** * RENAME = 9; */ - RENAME(8, 9), + RENAME(9), /** - * CINDEX = 10; - * *
-     **CREATE INDEX*
+     * *CREATE INDEX*
      * 
+ * + * CINDEX = 10; */ - CINDEX(9, 10), + CINDEX(10), /** * DINDEX = 11; */ - DINDEX(10, 11), + DINDEX(11), /** * GTID = 12; */ - GTID(11, 12), + GTID(12), /** - * XACOMMIT = 13; - * *
-     ** XA *
+     * * XA *
      * 
+ * + * XACOMMIT = 13; */ - XACOMMIT(12, 13), + XACOMMIT(13), /** * XAROLLBACK = 14; */ - XAROLLBACK(13, 14), + XAROLLBACK(14), /** - * MHEARTBEAT = 15; - * *
-     ** MASTER HEARTBEAT *
+     * * MASTER HEARTBEAT *
      * 
+ * + * MHEARTBEAT = 15; */ - MHEARTBEAT(14, 15), + MHEARTBEAT(15), + UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + EventType.class.getName()); + } + /** + * EVENTTYPECOMPATIBLEPROTO2 = 0; + */ + public static final int EVENTTYPECOMPATIBLEPROTO2_VALUE = 0; /** * INSERT = 1; */ @@ -249,11 +328,11 @@ public enum EventType */ public static final int RENAME_VALUE = 9; /** - * CINDEX = 10; - * *
-     **CREATE INDEX*
+     * *CREATE INDEX*
      * 
+ * + * CINDEX = 10; */ public static final int CINDEX_VALUE = 10; /** @@ -265,11 +344,11 @@ public enum EventType */ public static final int GTID_VALUE = 12; /** - * XACOMMIT = 13; - * *
-     ** XA *
+     * * XA *
      * 
+ * + * XACOMMIT = 13; */ public static final int XACOMMIT_VALUE = 13; /** @@ -277,19 +356,40 @@ public enum EventType */ public static final int XAROLLBACK_VALUE = 14; /** - * MHEARTBEAT = 15; - * *
-     ** MASTER HEARTBEAT *
+     * * MASTER HEARTBEAT *
      * 
+ * + * MHEARTBEAT = 15; */ public static final int MHEARTBEAT_VALUE = 15; - public final int getNumber() { return value; } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated public static EventType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EventType forNumber(int value) { switch (value) { + case 0: return EVENTTYPECOMPATIBLEPROTO2; case 1: return INSERT; case 2: return UPDATE; case 3: return DELETE; @@ -313,17 +413,21 @@ public static EventType valueOf(int value) { internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = + private static final com.google.protobuf.Internal.EnumLiteMap< + EventType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public EventType findValueByNumber(int number) { - return EventType.valueOf(number); + return EventType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(index); + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { @@ -331,7 +435,7 @@ public EventType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return CanalEntry.getDescriptor().getEnumTypes().get(1); + return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(1); } private static final EventType[] VALUES = values(); @@ -339,17 +443,18 @@ public EventType findValueByNumber(int number) { public static EventType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( + throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } return VALUES[desc.getIndex()]; } - private final int index; private final int value; - private EventType(int index, int value) { - this.index = index; + private EventType(int value) { this.value = value; } @@ -357,28 +462,46 @@ private EventType(int index, int value) { } /** - * Protobuf enum {@code com.alibaba.otter.canal.protocol.Type} - * *
-   **数据库类型*
+   * *数据库类型*
    * 
+ * + * Protobuf enum {@code com.alibaba.otter.canal.protocol.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * TYPECOMPATIBLEPROTO2 = 0; + */ + TYPECOMPATIBLEPROTO2(0), /** * ORACLE = 1; */ - ORACLE(0, 1), + ORACLE(1), /** * MYSQL = 2; */ - MYSQL(1, 2), + MYSQL(2), /** * PGSQL = 3; */ - PGSQL(2, 3), + PGSQL(3), + UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Type.class.getName()); + } + /** + * TYPECOMPATIBLEPROTO2 = 0; + */ + public static final int TYPECOMPATIBLEPROTO2_VALUE = 0; /** * ORACLE = 1; */ @@ -393,10 +516,31 @@ public enum Type public static final int PGSQL_VALUE = 3; - public final int getNumber() { return value; } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { switch (value) { + case 0: return TYPECOMPATIBLEPROTO2; case 1: return ORACLE; case 2: return MYSQL; case 3: return PGSQL; @@ -408,17 +552,21 @@ public static Type valueOf(int value) { internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = + private static final com.google.protobuf.Internal.EnumLiteMap< + Type> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Type findValueByNumber(int number) { - return Type.valueOf(number); + return Type.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(index); + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { @@ -426,7 +574,7 @@ public Type findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return CanalEntry.getDescriptor().getEnumTypes().get(2); + return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(2); } private static final Type[] VALUES = values(); @@ -434,17 +582,18 @@ public Type findValueByNumber(int number) { public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException( + throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } return VALUES[desc.getIndex()]; } - private final int index; private final int value; - private Type(int index, int value) { - this.index = index; + private Type(int value) { this.value = value; } @@ -456,277 +605,232 @@ public interface EntryOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-     **协议头部信息*
+     * *协议头部信息*
      * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; + * @return Whether the header field is set. */ boolean hasHeader(); /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-     **协议头部信息*
+     * *协议头部信息*
      * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; + * @return The header. */ - Header getHeader(); + com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader(); /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-     **协议头部信息*
+     * *协议头部信息*
      * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; */ - HeaderOrBuilder getHeaderOrBuilder(); + com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder(); /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-     **打散后的事件类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return Whether the entryType field is set. */ boolean hasEntryType(); /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-     **打散后的事件类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return The enum numeric value on the wire for entryType. */ - EntryType getEntryType(); - + int getEntryTypeValue(); /** - * optional bytes storeValue = 3; - * - *
-     **传输的二进制数组*
-     * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return The entryType. */ - boolean hasStoreValue(); + com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType(); + /** - * optional bytes storeValue = 3; - * *
-     **传输的二进制数组*
+     * *传输的二进制数组*
      * 
+ * + * bytes storeValue = 3; + * @return The storeValue. */ com.google.protobuf.ByteString getStoreValue(); + + com.alibaba.otter.canal.protocol.CanalEntry.Entry.EntryTypePresentCase getEntryTypePresentCase(); } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} - * *
-   ****************************************************************
-   * message model
-   *如果要在Enum中新增类型,确保以前的类型的下标值不变.
-   ***************************************************************
+   * ***************************************************************
+   * message model
+   * 如果要在Enum中新增类型,确保以前的类型的下标值不变.
+   * **************************************************************
    * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} */ public static final class Entry extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Entry) EntryOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Entry.class.getName()); + } // Use Entry.newBuilder() to construct. private Entry(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Entry(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Entry defaultInstance; - public static Entry getDefaultInstance() { - return defaultInstance; } - - public Entry getDefaultInstanceForType() { - return defaultInstance; + private Entry() { + storeValue_ = com.google.protobuf.ByteString.EMPTY; } - private final com.google.protobuf.UnknownFieldSet unknownFields; - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Entry( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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 (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - Header.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = header_.toBuilder(); - } - header_ = input.readMessage(Header.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(header_); - header_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 16: { - int rawValue = input.readEnum(); - EntryType value = EntryType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - entryType_ = value; - } - break; - } - case 26: { - bitField0_ |= 0x00000004; - storeValue_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable .ensureFieldAccessorsInitialized( - Entry.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.Entry.class, com.alibaba.otter.canal.protocol.CanalEntry.Entry.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Entry parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Entry(input, extensionRegistry); + private int bitField0_; + private int entryTypePresentCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object entryTypePresent_; + public enum EntryTypePresentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ENTRYTYPE(2), + ENTRYTYPEPRESENT_NOT_SET(0); + private final int value; + private EntryTypePresentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EntryTypePresentCase valueOf(int value) { + return forNumber(value); + } + + public static EntryTypePresentCase forNumber(int value) { + switch (value) { + case 2: return ENTRYTYPE; + case 0: return ENTRYTYPEPRESENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; } }; - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public EntryTypePresentCase + getEntryTypePresentCase() { + return EntryTypePresentCase.forNumber( + entryTypePresentCase_); } - private int bitField0_; public static final int HEADER_FIELD_NUMBER = 1; - private Header header_; + private com.alibaba.otter.canal.protocol.CanalEntry.Header header_; /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-     **协议头部信息*
+     * *协议头部信息*
      * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; + * @return Whether the header field is set. */ + @java.lang.Override public boolean hasHeader() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return ((bitField0_ & 0x00000001) != 0); } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-     **协议头部信息*
+     * *协议头部信息*
      * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; + * @return The header. */ - public Header getHeader() { - return header_; + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { + return header_ == null ? com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance() : header_; } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-     **协议头部信息*
+     * *协议头部信息*
      * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; */ - public HeaderOrBuilder getHeaderOrBuilder() { - return header_; + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { + return header_ == null ? com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance() : header_; } public static final int ENTRYTYPE_FIELD_NUMBER = 2; - private EntryType entryType_; /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-     **打散后的事件类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return Whether the entryType field is set. */ public boolean hasEntryType() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return entryTypePresentCase_ == 2; } /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-     **打散后的事件类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return The enum numeric value on the wire for entryType. */ - public EntryType getEntryType() { - return entryType_; + public int getEntryTypeValue() { + if (entryTypePresentCase_ == 2) { + return (java.lang.Integer) entryTypePresent_; + } + return 0; } - - public static final int STOREVALUE_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString storeValue_; /** - * optional bytes storeValue = 3; - * - *
-     **传输的二进制数组*
-     * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return The entryType. */ - public boolean hasStoreValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { + if (entryTypePresentCase_ == 2) { + com.alibaba.otter.canal.protocol.CanalEntry.EntryType result = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.forNumber( + (java.lang.Integer) entryTypePresent_); + return result == null ? com.alibaba.otter.canal.protocol.CanalEntry.EntryType.UNRECOGNIZED : result; + } + return com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ENTRYTYPECOMPATIBLEPROTO2; } + + public static final int STOREVALUE_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString storeValue_ = com.google.protobuf.ByteString.EMPTY; /** - * optional bytes storeValue = 3; - * *
-     **传输的二进制数组*
+     * *传输的二进制数组*
      * 
+ * + * bytes storeValue = 3; + * @return The storeValue. */ + @java.lang.Override public com.google.protobuf.ByteString getStoreValue() { return storeValue_; } - private void initFields() { - header_ = Header.getDefaultInstance(); - entryType_ = EntryType.ROWDATA; - storeValue_ = com.google.protobuf.ByteString.EMPTY; - } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -736,141 +840,217 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, header_); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getHeader()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, entryType_.getNumber()); + if (entryTypePresentCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) entryTypePresent_)); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (!storeValue_.isEmpty()) { output.writeBytes(3, storeValue_); } getUnknownFields().writeTo(output); } - private int memoizedSerializedSize = -1; + @java.lang.Override public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, header_); + .computeMessageSize(1, getHeader()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (entryTypePresentCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, entryType_.getNumber()); + .computeEnumSize(2, ((java.lang.Integer) entryTypePresent_)); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (!storeValue_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, storeValue_); } size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; + memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalEntry.Entry)) { + return super.equals(obj); + } + com.alibaba.otter.canal.protocol.CanalEntry.Entry other = (com.alibaba.otter.canal.protocol.CanalEntry.Entry) obj; + + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader() + .equals(other.getHeader())) return false; + } + if (!getStoreValue() + .equals(other.getStoreValue())) return false; + if (!getEntryTypePresentCase().equals(other.getEntryTypePresentCase())) return false; + switch (entryTypePresentCase_) { + case 2: + if (getEntryTypeValue() + != other.getEntryTypeValue()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + hash = (37 * hash) + STOREVALUE_FIELD_NUMBER; + hash = (53 * hash) + getStoreValue().hashCode(); + switch (entryTypePresentCase_) { + case 2: + hash = (37 * hash) + ENTRYTYPE_FIELD_NUMBER; + hash = (53 * hash) + getEntryTypeValue(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - public static Entry parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Entry parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Entry parseFrom(byte[] data) + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Entry parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Entry parseFrom(java.io.InputStream input) + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static Entry parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Entry parseDelimitedFrom(java.io.InputStream input) + + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); } - public static Entry parseDelimitedFrom( + + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static Entry parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static Entry parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(Entry prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Entry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} - * *
-     ****************************************************************
-     * message model
-     *如果要在Enum中新增类型,确保以前的类型的下标值不变.
-     ***************************************************************
+     * ***************************************************************
+     * message model
+     * 如果要在Enum中新增类型,确保以前的类型的下标值不变.
+     * **************************************************************
      * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Entry) - EntryOrBuilder { + com.alibaba.otter.canal.protocol.CanalEntry.EntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable .ensureFieldAccessorsInitialized( - Entry.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.Entry.class, com.alibaba.otter.canal.protocol.CanalEntry.Entry.Builder.class); } // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Entry.newBuilder() @@ -879,271 +1059,332 @@ private Builder() { } private Builder( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { getHeaderFieldBuilder(); } } - private static Builder create() { - return new Builder(); - } - + @java.lang.Override public Builder clear() { super.clear(); - if (headerBuilder_ == null) { - header_ = Header.getDefaultInstance(); - } else { - headerBuilder_.clear(); + bitField0_ = 0; + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000001); - entryType_ = EntryType.ROWDATA; - bitField0_ = (bitField0_ & ~0x00000002); storeValue_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); + entryTypePresentCase_ = 0; + entryTypePresent_ = null; return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; } - public Entry getDefaultInstanceForType() { - return Entry.getDefaultInstance(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Entry getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.Entry.getDefaultInstance(); } - public Entry build() { - Entry result = buildPartial(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Entry build() { + com.alibaba.otter.canal.protocol.CanalEntry.Entry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Entry buildPartial() { - Entry result = new Entry(this); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Entry buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.Entry result = new com.alibaba.otter.canal.protocol.CanalEntry.Entry(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalEntry.Entry result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + if (((from_bitField0_ & 0x00000001) != 0)) { + result.header_ = headerBuilder_ == null + ? header_ + : headerBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (headerBuilder_ == null) { - result.header_ = header_; - } else { - result.header_ = headerBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.storeValue_ = storeValue_; } - result.entryType_ = entryType_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.storeValue_ = storeValue_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalEntry.Entry result) { + result.entryTypePresentCase_ = entryTypePresentCase_; + result.entryTypePresent_ = this.entryTypePresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Entry) { - return mergeFrom((Entry)other); + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Entry) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Entry)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Entry other) { - if (other == Entry.getDefaultInstance()) return this; + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Entry other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.Entry.getDefaultInstance()) return this; if (other.hasHeader()) { mergeHeader(other.getHeader()); } - if (other.hasEntryType()) { - setEntryType(other.getEntryType()); - } - if (other.hasStoreValue()) { + if (other.getStoreValue() != com.google.protobuf.ByteString.EMPTY) { setStoreValue(other.getStoreValue()); } + switch (other.getEntryTypePresentCase()) { + case ENTRYTYPE: { + setEntryTypeValue(other.getEntryTypeValue()); + break; + } + case ENTRYTYPEPRESENT_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); + 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 { - Entry parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getHeaderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + int rawValue = input.readEnum(); + entryTypePresentCase_ = 2; + entryTypePresent_ = rawValue; + break; + } // case 16 + case 26: { + storeValue_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Entry) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally + return this; + } + private int entryTypePresentCase_ = 0; + private java.lang.Object entryTypePresent_; + public EntryTypePresentCase + getEntryTypePresentCase() { + return EntryTypePresentCase.forNumber( + entryTypePresentCase_); + } + + public Builder clearEntryTypePresent() { + entryTypePresentCase_ = 0; + entryTypePresent_ = null; + onChanged(); return this; } + private int bitField0_; - private Header header_ = Header.getDefaultInstance(); + private com.alibaba.otter.canal.protocol.CanalEntry.Header header_; private com.google.protobuf.SingleFieldBuilder< - Header, Header.Builder, HeaderOrBuilder> headerBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.Header, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder, com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder> headerBuilder_; /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-       **协议头部信息*
+       * *协议头部信息*
        * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; + * @return Whether the header field is set. */ public boolean hasHeader() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return ((bitField0_ & 0x00000001) != 0); } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-       **协议头部信息*
+       * *协议头部信息*
        * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; + * @return The header. */ - public Header getHeader() { + public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { if (headerBuilder_ == null) { - return header_; + return header_ == null ? com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance() : header_; } else { return headerBuilder_.getMessage(); } } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-       **协议头部信息*
+       * *协议头部信息*
        * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; */ - public Builder setHeader(Header value) { + public Builder setHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { if (headerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } header_ = value; - onChanged(); } else { headerBuilder_.setMessage(value); } bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-       **协议头部信息*
+       * *协议头部信息*
        * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; */ public Builder setHeader( - Header.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder builderForValue) { if (headerBuilder_ == null) { header_ = builderForValue.build(); - onChanged(); } else { headerBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; + onChanged(); return this; } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-       **协议头部信息*
+       * *协议头部信息*
        * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; */ - public Builder mergeHeader(Header value) { + public Builder mergeHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { if (headerBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - header_ != Header.getDefaultInstance()) { - header_ = - Header.newBuilder(header_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && + header_ != null && + header_ != com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance()) { + getHeaderBuilder().mergeFrom(value); } else { header_ = value; } - onChanged(); } else { headerBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; + if (header_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-       **协议头部信息*
+       * *协议头部信息*
        * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; */ public Builder clearHeader() { - if (headerBuilder_ == null) { - header_ = Header.getDefaultInstance(); - onChanged(); - } else { - headerBuilder_.clear(); - } bitField0_ = (bitField0_ & ~0x00000001); + header_ = null; + if (headerBuilder_ != null) { + headerBuilder_.dispose(); + headerBuilder_ = null; + } + onChanged(); return this; } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-       **协议头部信息*
+       * *协议头部信息*
        * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; */ - public Header.Builder getHeaderBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder getHeaderBuilder() { bitField0_ |= 0x00000001; onChanged(); return getHeaderFieldBuilder().getBuilder(); } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-       **协议头部信息*
+       * *协议头部信息*
        * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; */ - public HeaderOrBuilder getHeaderOrBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { if (headerBuilder_ != null) { return headerBuilder_.getMessageOrBuilder(); } else { - return header_; + return header_ == null ? + com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance() : header_; } } /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * *
-       **协议头部信息*
+       * *协议头部信息*
        * 
+ * + * .com.alibaba.otter.canal.protocol.Header header = 1; */ private com.google.protobuf.SingleFieldBuilder< - Header, Header.Builder, HeaderOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.Header, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder, com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder> getHeaderFieldBuilder() { if (headerBuilder_ == null) { headerBuilder_ = new com.google.protobuf.SingleFieldBuilder< - Header, Header.Builder, HeaderOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.Header, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder, com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder>( getHeader(), getParentForChildren(), isClean()); @@ -1152,100 +1393,112 @@ public HeaderOrBuilder getHeaderOrBuilder() { return headerBuilder_; } - private EntryType entryType_ = EntryType.ROWDATA; /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-       **打散后的事件类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return Whether the entryType field is set. */ + @java.lang.Override public boolean hasEntryType() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return entryTypePresentCase_ == 2; } /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-       **打散后的事件类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return The enum numeric value on the wire for entryType. */ - public EntryType getEntryType() { - return entryType_; + @java.lang.Override + public int getEntryTypeValue() { + if (entryTypePresentCase_ == 2) { + return ((java.lang.Integer) entryTypePresent_).intValue(); + } + return 0; } /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-       **打散后的事件类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @param value The enum numeric value on the wire for entryType to set. + * @return This builder for chaining. + */ + public Builder setEntryTypeValue(int value) { + entryTypePresentCase_ = 2; + entryTypePresent_ = value; + onChanged(); + return this; + } + /** + * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return The entryType. */ - public Builder setEntryType(EntryType value) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { + if (entryTypePresentCase_ == 2) { + com.alibaba.otter.canal.protocol.CanalEntry.EntryType result = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.forNumber( + (java.lang.Integer) entryTypePresent_); + return result == null ? com.alibaba.otter.canal.protocol.CanalEntry.EntryType.UNRECOGNIZED : result; + } + return com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ENTRYTYPECOMPATIBLEPROTO2; + } + /** + * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @param value The entryType to set. + * @return This builder for chaining. + */ + public Builder setEntryType(com.alibaba.otter.canal.protocol.CanalEntry.EntryType value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - entryType_ = value; + entryTypePresentCase_ = 2; + entryTypePresent_ = value.getNumber(); onChanged(); return this; } /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-       **打散后的事件类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EntryType entryType = 2; + * @return This builder for chaining. */ public Builder clearEntryType() { - bitField0_ = (bitField0_ & ~0x00000002); - entryType_ = EntryType.ROWDATA; - onChanged(); + if (entryTypePresentCase_ == 2) { + entryTypePresentCase_ = 0; + entryTypePresent_ = null; + onChanged(); + } return this; } private com.google.protobuf.ByteString storeValue_ = com.google.protobuf.ByteString.EMPTY; /** - * optional bytes storeValue = 3; - * *
-       **传输的二进制数组*
+       * *传输的二进制数组*
        * 
- */ - public boolean hasStoreValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional bytes storeValue = 3; * - *
-       **传输的二进制数组*
-       * 
+ * bytes storeValue = 3; + * @return The storeValue. */ + @java.lang.Override public com.google.protobuf.ByteString getStoreValue() { return storeValue_; } /** - * optional bytes storeValue = 3; - * *
-       **传输的二进制数组*
+       * *传输的二进制数组*
        * 
+ * + * bytes storeValue = 3; + * @param value The storeValue to set. + * @return This builder for chaining. */ public Builder setStoreValue(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + if (value == null) { throw new NullPointerException(); } storeValue_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * optional bytes storeValue = 3; - * *
-       **传输的二进制数组*
+       * *传输的二进制数组*
        * 
+ * + * bytes storeValue = 3; + * @return This builder for chaining. */ public Builder clearStoreValue() { bitField0_ = (bitField0_ & ~0x00000004); @@ -1257,12 +1510,52 @@ public Builder clearStoreValue() { // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Entry) } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Entry) + private static final com.alibaba.otter.canal.protocol.CanalEntry.Entry DEFAULT_INSTANCE; static { - defaultInstance = new Entry(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalEntry.Entry(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Entry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Entry) } public interface HeaderOrBuilder extends @@ -1270,551 +1563,466 @@ public interface HeaderOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int32 version = 1 [default = 1]; - * - *
-     **协议的版本号*
-     * 
+ * int32 version = 1; + * @return Whether the version field is set. */ boolean hasVersion(); /** - * optional int32 version = 1 [default = 1]; - * - *
-     **协议的版本号*
-     * 
+ * int32 version = 1; + * @return The version. */ int getVersion(); /** - * optional string logfileName = 2; - * *
-     **binlog/redolog 文件名*
+     * *binlog/redolog 文件名*
      * 
- */ - boolean hasLogfileName(); - /** - * optional string logfileName = 2; * - *
-     **binlog/redolog 文件名*
-     * 
+ * string logfileName = 2; + * @return The logfileName. */ - String getLogfileName(); + java.lang.String getLogfileName(); /** - * optional string logfileName = 2; - * *
-     **binlog/redolog 文件名*
+     * *binlog/redolog 文件名*
      * 
+ * + * string logfileName = 2; + * @return The bytes for logfileName. */ com.google.protobuf.ByteString getLogfileNameBytes(); /** - * optional int64 logfileOffset = 3; - * *
-     **binlog/redolog 文件的偏移位置*
+     * *binlog/redolog 文件的偏移位置*
      * 
- */ - boolean hasLogfileOffset(); - /** - * optional int64 logfileOffset = 3; * - *
-     **binlog/redolog 文件的偏移位置*
-     * 
+ * int64 logfileOffset = 3; + * @return The logfileOffset. */ long getLogfileOffset(); /** - * optional int64 serverId = 4; - * *
-     **服务端serverId*
+     * *服务端serverId*
      * 
- */ - boolean hasServerId(); - /** - * optional int64 serverId = 4; * - *
-     **服务端serverId*
-     * 
+ * int64 serverId = 4; + * @return The serverId. */ long getServerId(); /** - * optional string serverenCode = 5; - * *
-     ** 变更数据的编码 *
+     * * 变更数据的编码 *
      * 
- */ - boolean hasServerenCode(); - /** - * optional string serverenCode = 5; * - *
-     ** 变更数据的编码 *
-     * 
+ * string serverenCode = 5; + * @return The serverenCode. */ - String getServerenCode(); + java.lang.String getServerenCode(); /** - * optional string serverenCode = 5; - * *
-     ** 变更数据的编码 *
+     * * 变更数据的编码 *
      * 
+ * + * string serverenCode = 5; + * @return The bytes for serverenCode. */ com.google.protobuf.ByteString getServerenCodeBytes(); /** - * optional int64 executeTime = 6; - * *
-     **变更数据的执行时间 *
+     * *变更数据的执行时间 *
      * 
- */ - boolean hasExecuteTime(); - /** - * optional int64 executeTime = 6; * - *
-     **变更数据的执行时间 *
-     * 
+ * int64 executeTime = 6; + * @return The executeTime. */ long getExecuteTime(); /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-     ** 变更数据的来源*
-     * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return Whether the sourceType field is set. */ boolean hasSourceType(); /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-     ** 变更数据的来源*
-     * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return The enum numeric value on the wire for sourceType. */ - Type getSourceType(); - + int getSourceTypeValue(); /** - * optional string schemaName = 8; - * - *
-     ** 变更数据的schemaname*
-     * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return The sourceType. */ - boolean hasSchemaName(); + com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType(); + /** - * optional string schemaName = 8; - * *
-     ** 变更数据的schemaname*
+     * * 变更数据的schemaname*
      * 
+ * + * string schemaName = 8; + * @return The schemaName. */ - String getSchemaName(); + java.lang.String getSchemaName(); /** - * optional string schemaName = 8; - * *
-     ** 变更数据的schemaname*
+     * * 变更数据的schemaname*
      * 
+ * + * string schemaName = 8; + * @return The bytes for schemaName. */ com.google.protobuf.ByteString getSchemaNameBytes(); /** - * optional string tableName = 9; - * *
-     **变更数据的tablename*
+     * *变更数据的tablename*
      * 
- */ - boolean hasTableName(); - /** - * optional string tableName = 9; * - *
-     **变更数据的tablename*
-     * 
+ * string tableName = 9; + * @return The tableName. */ - String getTableName(); + java.lang.String getTableName(); /** - * optional string tableName = 9; - * *
-     **变更数据的tablename*
+     * *变更数据的tablename*
      * 
+ * + * string tableName = 9; + * @return The bytes for tableName. */ com.google.protobuf.ByteString getTableNameBytes(); /** - * optional int64 eventLength = 10; - * *
-     **每个event的长度*
+     * *每个event的长度*
      * 
- */ - boolean hasEventLength(); - /** - * optional int64 eventLength = 10; * - *
-     **每个event的长度*
-     * 
+ * int64 eventLength = 10; + * @return The eventLength. */ long getEventLength(); /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return Whether the eventType field is set. */ boolean hasEventType(); /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return The enum numeric value on the wire for eventType. + */ + int getEventTypeValue(); + /** + * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return The eventType. */ - EventType getEventType(); + com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - java.util.List + java.util.List getPropsList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - Pair getProps(int index); + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ int getPropsCount(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - java.util.List + java.util.List getPropsOrBuilderList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - PairOrBuilder getPropsOrBuilder(int index); + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); /** - * optional string gtid = 13; - * *
-     **当前事务的gitd*
+     * *当前事务的gitd*
      * 
- */ - boolean hasGtid(); - /** - * optional string gtid = 13; * - *
-     **当前事务的gitd*
-     * 
+ * string gtid = 13; + * @return The gtid. */ - String getGtid(); + java.lang.String getGtid(); /** - * optional string gtid = 13; - * *
-     **当前事务的gitd*
+     * *当前事务的gitd*
      * 
+ * + * string gtid = 13; + * @return The bytes for gtid. */ com.google.protobuf.ByteString getGtidBytes(); + + com.alibaba.otter.canal.protocol.CanalEntry.Header.VersionPresentCase getVersionPresentCase(); + + com.alibaba.otter.canal.protocol.CanalEntry.Header.SourceTypePresentCase getSourceTypePresentCase(); + + com.alibaba.otter.canal.protocol.CanalEntry.Header.EventTypePresentCase getEventTypePresentCase(); } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Header} - * *
-   **message Header*
+   * *message Header*
    * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.Header} */ public static final class Header extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Header) HeaderOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Header.class.getName()); + } // Use Header.newBuilder() to construct. private Header(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Header(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Header defaultInstance; - public static Header getDefaultInstance() { - return defaultInstance; + private Header() { + logfileName_ = ""; + serverenCode_ = ""; + schemaName_ = ""; + tableName_ = ""; + props_ = java.util.Collections.emptyList(); + gtid_ = ""; } - public Header getDefaultInstanceForType() { - return defaultInstance; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; } - private final com.google.protobuf.UnknownFieldSet unknownFields; - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.Header.class, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder.class); } - private Header( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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 (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - version_ = input.readInt32(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - logfileName_ = bs; - break; - } - case 24: { - bitField0_ |= 0x00000004; - logfileOffset_ = input.readInt64(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - serverId_ = input.readInt64(); - break; - } - case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000010; - serverenCode_ = bs; - break; - } - case 48: { - bitField0_ |= 0x00000020; - executeTime_ = input.readInt64(); - break; - } - case 56: { - int rawValue = input.readEnum(); - Type value = Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(7, rawValue); - } else { - bitField0_ |= 0x00000040; - sourceType_ = value; - } - break; - } - case 66: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000080; - schemaName_ = bs; - break; - } - case 74: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000100; - tableName_ = bs; - break; - } - case 80: { - bitField0_ |= 0x00000200; - eventLength_ = input.readInt64(); - break; - } - case 88: { - int rawValue = input.readEnum(); - EventType value = EventType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(11, rawValue); - } else { - bitField0_ |= 0x00000400; - eventType_ = value; - } - break; - } - case 98: { - if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - props_.add(input.readMessage(Pair.PARSER, extensionRegistry)); - break; - } - case 106: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000800; - gtid_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) { - props_ = java.util.Collections.unmodifiableList(props_); + + private int versionPresentCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object versionPresent_; + public enum VersionPresentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VERSION(1), + VERSIONPRESENT_NOT_SET(0); + private final int value; + private VersionPresentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VersionPresentCase valueOf(int value) { + return forNumber(value); + } + + public static VersionPresentCase forNumber(int value) { + switch (value) { + case 1: return VERSION; + case 0: return VERSIONPRESENT_NOT_SET; + default: return null; } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; + public int getNumber() { + return this.value; + } + }; + + public VersionPresentCase + getVersionPresentCase() { + return VersionPresentCase.forNumber( + versionPresentCase_); } - protected FieldAccessorTable - internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Header.class, Builder.class); + private int sourceTypePresentCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object sourceTypePresent_; + public enum SourceTypePresentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SOURCETYPE(7), + SOURCETYPEPRESENT_NOT_SET(0); + private final int value; + private SourceTypePresentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceTypePresentCase valueOf(int value) { + return forNumber(value); + } + + public static SourceTypePresentCase forNumber(int value) { + switch (value) { + case 7: return SOURCETYPE; + case 0: return SOURCETYPEPRESENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public SourceTypePresentCase + getSourceTypePresentCase() { + return SourceTypePresentCase.forNumber( + sourceTypePresentCase_); } - public static com.google.protobuf.Parser
PARSER = - new com.google.protobuf.AbstractParser
() { - public Header parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Header(input, extensionRegistry); + private int eventTypePresentCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object eventTypePresent_; + public enum EventTypePresentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EVENTTYPE(11), + EVENTTYPEPRESENT_NOT_SET(0); + private final int value; + private EventTypePresentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventTypePresentCase valueOf(int value) { + return forNumber(value); + } + + public static EventTypePresentCase forNumber(int value) { + switch (value) { + case 11: return EVENTTYPE; + case 0: return EVENTTYPEPRESENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; } }; - @Override - public com.google.protobuf.Parser
getParserForType() { - return PARSER; + public EventTypePresentCase + getEventTypePresentCase() { + return EventTypePresentCase.forNumber( + eventTypePresentCase_); } - private int bitField0_; public static final int VERSION_FIELD_NUMBER = 1; - private int version_; /** - * optional int32 version = 1 [default = 1]; - * - *
-     **协议的版本号*
-     * 
+ * int32 version = 1; + * @return Whether the version field is set. */ + @java.lang.Override public boolean hasVersion() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return versionPresentCase_ == 1; } /** - * optional int32 version = 1 [default = 1]; - * - *
-     **协议的版本号*
-     * 
+ * int32 version = 1; + * @return The version. */ + @java.lang.Override public int getVersion() { - return version_; + if (versionPresentCase_ == 1) { + return (java.lang.Integer) versionPresent_; + } + return 0; } public static final int LOGFILENAME_FIELD_NUMBER = 2; - private Object logfileName_; + @SuppressWarnings("serial") + private volatile java.lang.Object logfileName_ = ""; /** - * optional string logfileName = 2; - * *
-     **binlog/redolog 文件名*
+     * *binlog/redolog 文件名*
      * 
- */ - public boolean hasLogfileName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string logfileName = 2; * - *
-     **binlog/redolog 文件名*
-     * 
+ * string logfileName = 2; + * @return The logfileName. */ - public String getLogfileName() { - Object ref = logfileName_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getLogfileName() { + java.lang.Object ref = logfileName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - logfileName_ = s; - } + java.lang.String s = bs.toStringUtf8(); + logfileName_ = s; return s; } } /** - * optional string logfileName = 2; - * *
-     **binlog/redolog 文件名*
+     * *binlog/redolog 文件名*
      * 
+ * + * string logfileName = 2; + * @return The bytes for logfileName. */ + @java.lang.Override public com.google.protobuf.ByteString getLogfileNameBytes() { - Object ref = logfileName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = logfileName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); logfileName_ = b; return b; } else { @@ -1823,98 +2031,75 @@ public String getLogfileName() { } public static final int LOGFILEOFFSET_FIELD_NUMBER = 3; - private long logfileOffset_; + private long logfileOffset_ = 0L; /** - * optional int64 logfileOffset = 3; - * *
-     **binlog/redolog 文件的偏移位置*
+     * *binlog/redolog 文件的偏移位置*
      * 
- */ - public boolean hasLogfileOffset() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int64 logfileOffset = 3; * - *
-     **binlog/redolog 文件的偏移位置*
-     * 
+ * int64 logfileOffset = 3; + * @return The logfileOffset. */ + @java.lang.Override public long getLogfileOffset() { return logfileOffset_; } public static final int SERVERID_FIELD_NUMBER = 4; - private long serverId_; + private long serverId_ = 0L; /** - * optional int64 serverId = 4; - * *
-     **服务端serverId*
+     * *服务端serverId*
      * 
- */ - public boolean hasServerId() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int64 serverId = 4; * - *
-     **服务端serverId*
-     * 
+ * int64 serverId = 4; + * @return The serverId. */ + @java.lang.Override public long getServerId() { return serverId_; } public static final int SERVERENCODE_FIELD_NUMBER = 5; - private Object serverenCode_; + @SuppressWarnings("serial") + private volatile java.lang.Object serverenCode_ = ""; /** - * optional string serverenCode = 5; - * *
-     ** 变更数据的编码 *
+     * * 变更数据的编码 *
      * 
- */ - public boolean hasServerenCode() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional string serverenCode = 5; * - *
-     ** 变更数据的编码 *
-     * 
+ * string serverenCode = 5; + * @return The serverenCode. */ - public String getServerenCode() { - Object ref = serverenCode_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getServerenCode() { + java.lang.Object ref = serverenCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - serverenCode_ = s; - } + java.lang.String s = bs.toStringUtf8(); + serverenCode_ = s; return s; } } /** - * optional string serverenCode = 5; - * *
-     ** 变更数据的编码 *
+     * * 变更数据的编码 *
      * 
+ * + * string serverenCode = 5; + * @return The bytes for serverenCode. */ + @java.lang.Override public com.google.protobuf.ByteString getServerenCodeBytes() { - Object ref = serverenCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = serverenCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); serverenCode_ = b; return b; } else { @@ -1923,98 +2108,91 @@ public String getServerenCode() { } public static final int EXECUTETIME_FIELD_NUMBER = 6; - private long executeTime_; + private long executeTime_ = 0L; /** - * optional int64 executeTime = 6; - * *
-     **变更数据的执行时间 *
+     * *变更数据的执行时间 *
      * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 executeTime = 6; * - *
-     **变更数据的执行时间 *
-     * 
+ * int64 executeTime = 6; + * @return The executeTime. */ + @java.lang.Override public long getExecuteTime() { return executeTime_; } public static final int SOURCETYPE_FIELD_NUMBER = 7; - private Type sourceType_; /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-     ** 变更数据的来源*
-     * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return Whether the sourceType field is set. */ public boolean hasSourceType() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return sourceTypePresentCase_ == 7; } /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-     ** 变更数据的来源*
-     * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return The enum numeric value on the wire for sourceType. */ - public Type getSourceType() { - return sourceType_; + public int getSourceTypeValue() { + if (sourceTypePresentCase_ == 7) { + return (java.lang.Integer) sourceTypePresent_; + } + return 0; } - - public static final int SCHEMANAME_FIELD_NUMBER = 8; - private Object schemaName_; /** - * optional string schemaName = 8; - * - *
-     ** 变更数据的schemaname*
-     * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return The sourceType. */ - public boolean hasSchemaName() { - return ((bitField0_ & 0x00000080) == 0x00000080); + public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { + if (sourceTypePresentCase_ == 7) { + com.alibaba.otter.canal.protocol.CanalEntry.Type result = com.alibaba.otter.canal.protocol.CanalEntry.Type.forNumber( + (java.lang.Integer) sourceTypePresent_); + return result == null ? com.alibaba.otter.canal.protocol.CanalEntry.Type.UNRECOGNIZED : result; + } + return com.alibaba.otter.canal.protocol.CanalEntry.Type.TYPECOMPATIBLEPROTO2; } + + public static final int SCHEMANAME_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object schemaName_ = ""; /** - * optional string schemaName = 8; - * *
-     ** 变更数据的schemaname*
+     * * 变更数据的schemaname*
      * 
+ * + * string schemaName = 8; + * @return The schemaName. */ - public String getSchemaName() { - Object ref = schemaName_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getSchemaName() { + java.lang.Object ref = schemaName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - schemaName_ = s; - } + java.lang.String s = bs.toStringUtf8(); + schemaName_ = s; return s; } } /** - * optional string schemaName = 8; - * *
-     ** 变更数据的schemaname*
+     * * 变更数据的schemaname*
      * 
+ * + * string schemaName = 8; + * @return The bytes for schemaName. */ + @java.lang.Override public com.google.protobuf.ByteString getSchemaNameBytes() { - Object ref = schemaName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = schemaName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); schemaName_ = b; return b; } else { @@ -2023,52 +2201,45 @@ public String getSchemaName() { } public static final int TABLENAME_FIELD_NUMBER = 9; - private Object tableName_; + @SuppressWarnings("serial") + private volatile java.lang.Object tableName_ = ""; /** - * optional string tableName = 9; - * *
-     **变更数据的tablename*
+     * *变更数据的tablename*
      * 
- */ - public boolean hasTableName() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional string tableName = 9; * - *
-     **变更数据的tablename*
-     * 
+ * string tableName = 9; + * @return The tableName. */ - public String getTableName() { - Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - tableName_ = s; - } + java.lang.String s = bs.toStringUtf8(); + tableName_ = s; return s; } } /** - * optional string tableName = 9; - * *
-     **变更数据的tablename*
+     * *变更数据的tablename*
      * 
+ * + * string tableName = 9; + * @return The bytes for tableName. */ + @java.lang.Override public com.google.protobuf.ByteString getTableNameBytes() { - Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); tableName_ = b; return b; } else { @@ -2077,153 +2248,152 @@ public String getTableName() { } public static final int EVENTLENGTH_FIELD_NUMBER = 10; - private long eventLength_; + private long eventLength_ = 0L; /** - * optional int64 eventLength = 10; - * *
-     **每个event的长度*
+     * *每个event的长度*
      * 
- */ - public boolean hasEventLength() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional int64 eventLength = 10; * - *
-     **每个event的长度*
-     * 
+ * int64 eventLength = 10; + * @return The eventLength. */ + @java.lang.Override public long getEventLength() { return eventLength_; } public static final int EVENTTYPE_FIELD_NUMBER = 11; - private EventType eventType_; /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return Whether the eventType field is set. */ public boolean hasEventType() { - return ((bitField0_ & 0x00000400) == 0x00000400); + return eventTypePresentCase_ == 11; } /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return The enum numeric value on the wire for eventType. + */ + public int getEventTypeValue() { + if (eventTypePresentCase_ == 11) { + return (java.lang.Integer) eventTypePresent_; + } + return 0; + } + /** + * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return The eventType. */ - public EventType getEventType() { - return eventType_; + public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { + if (eventTypePresentCase_ == 11) { + com.alibaba.otter.canal.protocol.CanalEntry.EventType result = com.alibaba.otter.canal.protocol.CanalEntry.EventType.forNumber( + (java.lang.Integer) eventTypePresent_); + return result == null ? com.alibaba.otter.canal.protocol.CanalEntry.EventType.UNRECOGNIZED : result; + } + return com.alibaba.otter.canal.protocol.CanalEntry.EventType.EVENTTYPECOMPATIBLEPROTO2; } public static final int PROPS_FIELD_NUMBER = 12; - private java.util.List props_; + @SuppressWarnings("serial") + private java.util.List props_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public java.util.List getPropsList() { + @java.lang.Override + public java.util.List getPropsList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public java.util.List + @java.lang.Override + public java.util.List getPropsOrBuilderList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ + @java.lang.Override public int getPropsCount() { return props_.size(); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public Pair getProps(int index) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public PairOrBuilder getPropsOrBuilder( + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } public static final int GTID_FIELD_NUMBER = 13; - private Object gtid_; + @SuppressWarnings("serial") + private volatile java.lang.Object gtid_ = ""; /** - * optional string gtid = 13; - * *
-     **当前事务的gitd*
+     * *当前事务的gitd*
      * 
- */ - public boolean hasGtid() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional string gtid = 13; * - *
-     **当前事务的gitd*
-     * 
+ * string gtid = 13; + * @return The gtid. */ - public String getGtid() { - Object ref = gtid_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getGtid() { + java.lang.Object ref = gtid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - gtid_ = s; - } + java.lang.String s = bs.toStringUtf8(); + gtid_ = s; return s; } } /** - * optional string gtid = 13; - * *
-     **当前事务的gitd*
+     * *当前事务的gitd*
      * 
+ * + * string gtid = 13; + * @return The bytes for gtid. */ + @java.lang.Override public com.google.protobuf.ByteString getGtidBytes() { - Object ref = gtid_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = gtid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); gtid_ = b; return b; } else { @@ -2231,22 +2401,8 @@ public String getGtid() { } } - private void initFields() { - version_ = 1; - logfileName_ = ""; - logfileOffset_ = 0L; - serverId_ = 0L; - serverenCode_ = ""; - executeTime_ = 0L; - sourceType_ = Type.MYSQL; - schemaName_ = ""; - tableName_ = ""; - eventLength_ = 0L; - eventType_ = EventType.UPDATE; - props_ = java.util.Collections.emptyList(); - gtid_ = ""; - } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -2256,403 +2412,515 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, version_); + if (versionPresentCase_ == 1) { + output.writeInt32( + 1, (int)((java.lang.Integer) versionPresent_)); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getLogfileNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(logfileName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, logfileName_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (logfileOffset_ != 0L) { output.writeInt64(3, logfileOffset_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (serverId_ != 0L) { output.writeInt64(4, serverId_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getServerenCodeBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverenCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, serverenCode_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (executeTime_ != 0L) { output.writeInt64(6, executeTime_); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeEnum(7, sourceType_.getNumber()); + if (sourceTypePresentCase_ == 7) { + output.writeEnum(7, ((java.lang.Integer) sourceTypePresent_)); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(8, getSchemaNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, schemaName_); } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeBytes(9, getTableNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, tableName_); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { + if (eventLength_ != 0L) { output.writeInt64(10, eventLength_); } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeEnum(11, eventType_.getNumber()); + if (eventTypePresentCase_ == 11) { + output.writeEnum(11, ((java.lang.Integer) eventTypePresent_)); } for (int i = 0; i < props_.size(); i++) { output.writeMessage(12, props_.get(i)); } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeBytes(13, getGtidBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gtid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, gtid_); } getUnknownFields().writeTo(output); } - private int memoizedSerializedSize = -1; + @java.lang.Override public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (versionPresentCase_ == 1) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, version_); + .computeInt32Size( + 1, (int)((java.lang.Integer) versionPresent_)); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getLogfileNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(logfileName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, logfileName_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (logfileOffset_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, logfileOffset_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (serverId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, serverId_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getServerenCodeBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serverenCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, serverenCode_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (executeTime_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(6, executeTime_); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (sourceTypePresentCase_ == 7) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, sourceType_.getNumber()); + .computeEnumSize(7, ((java.lang.Integer) sourceTypePresent_)); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, getSchemaNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(schemaName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, schemaName_); } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(9, getTableNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, tableName_); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { + if (eventLength_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(10, eventLength_); } - if (((bitField0_ & 0x00000400) == 0x00000400)) { + if (eventTypePresentCase_ == 11) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(11, eventType_.getNumber()); + .computeEnumSize(11, ((java.lang.Integer) eventTypePresent_)); } for (int i = 0; i < props_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(12, props_.get(i)); } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(13, getGtidBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gtid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(13, gtid_); } size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; + memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalEntry.Header)) { + return super.equals(obj); + } + com.alibaba.otter.canal.protocol.CanalEntry.Header other = (com.alibaba.otter.canal.protocol.CanalEntry.Header) obj; + + if (!getLogfileName() + .equals(other.getLogfileName())) return false; + if (getLogfileOffset() + != other.getLogfileOffset()) return false; + if (getServerId() + != other.getServerId()) return false; + if (!getServerenCode() + .equals(other.getServerenCode())) return false; + if (getExecuteTime() + != other.getExecuteTime()) return false; + if (!getSchemaName() + .equals(other.getSchemaName())) return false; + if (!getTableName() + .equals(other.getTableName())) return false; + if (getEventLength() + != other.getEventLength()) return false; + if (!getPropsList() + .equals(other.getPropsList())) return false; + if (!getGtid() + .equals(other.getGtid())) return false; + if (!getVersionPresentCase().equals(other.getVersionPresentCase())) return false; + switch (versionPresentCase_) { + case 1: + if (getVersion() + != other.getVersion()) return false; + break; + case 0: + default: + } + if (!getSourceTypePresentCase().equals(other.getSourceTypePresentCase())) return false; + switch (sourceTypePresentCase_) { + case 7: + if (getSourceTypeValue() + != other.getSourceTypeValue()) return false; + break; + case 0: + default: + } + if (!getEventTypePresentCase().equals(other.getEventTypePresentCase())) return false; + switch (eventTypePresentCase_) { + case 11: + if (getEventTypeValue() + != other.getEventTypeValue()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - public static Header parseFrom( + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOGFILENAME_FIELD_NUMBER; + hash = (53 * hash) + getLogfileName().hashCode(); + hash = (37 * hash) + LOGFILEOFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLogfileOffset()); + hash = (37 * hash) + SERVERID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getServerId()); + hash = (37 * hash) + SERVERENCODE_FIELD_NUMBER; + hash = (53 * hash) + getServerenCode().hashCode(); + hash = (37 * hash) + EXECUTETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getExecuteTime()); + hash = (37 * hash) + SCHEMANAME_FIELD_NUMBER; + hash = (53 * hash) + getSchemaName().hashCode(); + hash = (37 * hash) + TABLENAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + hash = (37 * hash) + EVENTLENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEventLength()); + if (getPropsCount() > 0) { + hash = (37 * hash) + PROPS_FIELD_NUMBER; + hash = (53 * hash) + getPropsList().hashCode(); + } + hash = (37 * hash) + GTID_FIELD_NUMBER; + hash = (53 * hash) + getGtid().hashCode(); + switch (versionPresentCase_) { + case 1: + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion(); + break; + case 0: + default: + } + switch (sourceTypePresentCase_) { + case 7: + hash = (37 * hash) + SOURCETYPE_FIELD_NUMBER; + hash = (53 * hash) + getSourceTypeValue(); + break; + case 0: + default: + } + switch (eventTypePresentCase_) { + case 11: + hash = (37 * hash) + EVENTTYPE_FIELD_NUMBER; + hash = (53 * hash) + getEventTypeValue(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Header parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Header parseFrom(byte[] data) + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Header parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Header parseFrom(java.io.InputStream input) + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static Header parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Header parseDelimitedFrom(java.io.InputStream input) + + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); } - public static Header parseDelimitedFrom( + + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static Header parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static Header parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(Header prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Header prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Header} - * *
-     **message Header*
+     * *message Header*
      * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.Header} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Header) - HeaderOrBuilder { + com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable .ensureFieldAccessorsInitialized( - Header.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.Header.class, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder.class); } // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Header.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPropsFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } + } + @java.lang.Override public Builder clear() { super.clear(); - version_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = 0; logfileName_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); logfileOffset_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); serverId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); serverenCode_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); executeTime_ = 0L; - bitField0_ = (bitField0_ & ~0x00000020); - sourceType_ = Type.MYSQL; - bitField0_ = (bitField0_ & ~0x00000040); schemaName_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000100); eventLength_ = 0L; - bitField0_ = (bitField0_ & ~0x00000200); - eventType_ = EventType.UPDATE; - bitField0_ = (bitField0_ & ~0x00000400); if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + props_ = null; propsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); gtid_ = ""; - bitField0_ = (bitField0_ & ~0x00001000); + versionPresentCase_ = 0; + versionPresent_ = null; + sourceTypePresentCase_ = 0; + sourceTypePresent_ = null; + eventTypePresentCase_ = 0; + eventTypePresent_ = null; return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; } - public Header getDefaultInstanceForType() { - return Header.getDefaultInstance(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Header getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); } - public Header build() { - Header result = buildPartial(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Header build() { + com.alibaba.otter.canal.protocol.CanalEntry.Header result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return result; + } + + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Header buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.Header result = new com.alibaba.otter.canal.protocol.CanalEntry.Header(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.alibaba.otter.canal.protocol.CanalEntry.Header result) { + if (propsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + props_ = java.util.Collections.unmodifiableList(props_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.props_ = props_; + } else { + result.props_ = propsBuilder_.build(); + } } - public Header buildPartial() { - Header result = new Header(this); + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalEntry.Header result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.version_ = version_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.logfileName_ = logfileName_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.logfileOffset_ = logfileOffset_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.logfileName_ = logfileName_; } - result.serverId_ = serverId_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.logfileOffset_ = logfileOffset_; } - result.serverenCode_ = serverenCode_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.serverId_ = serverId_; } - result.executeTime_ = executeTime_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.serverenCode_ = serverenCode_; } - result.sourceType_ = sourceType_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.executeTime_ = executeTime_; } - result.schemaName_ = schemaName_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.schemaName_ = schemaName_; } - result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.tableName_ = tableName_; } - result.eventLength_ = eventLength_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } - result.eventType_ = eventType_; - if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000800) == 0x00000800)) { - props_ = java.util.Collections.unmodifiableList(props_); - bitField0_ = (bitField0_ & ~0x00000800); - } - result.props_ = props_; - } else { - result.props_ = propsBuilder_.build(); + if (((from_bitField0_ & 0x00000200) != 0)) { + result.eventLength_ = eventLength_; } - if (((from_bitField0_ & 0x00001000) == 0x00001000)) { - to_bitField0_ |= 0x00000800; + if (((from_bitField0_ & 0x00001000) != 0)) { + result.gtid_ = gtid_; } - result.gtid_ = gtid_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; } + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalEntry.Header result) { + result.versionPresentCase_ = versionPresentCase_; + result.versionPresent_ = this.versionPresent_; + result.sourceTypePresentCase_ = sourceTypePresentCase_; + result.sourceTypePresent_ = this.sourceTypePresent_; + result.eventTypePresentCase_ = eventTypePresentCase_; + result.eventTypePresent_ = this.eventTypePresent_; + } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Header) { - return mergeFrom((Header)other); + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Header) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Header)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Header other) { - if (other == Header.getDefaultInstance()) return this; - if (other.hasVersion()) { - setVersion(other.getVersion()); - } - if (other.hasLogfileName()) { - bitField0_ |= 0x00000002; + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Header other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance()) return this; + if (!other.getLogfileName().isEmpty()) { logfileName_ = other.logfileName_; + bitField0_ |= 0x00000002; onChanged(); } - if (other.hasLogfileOffset()) { + if (other.getLogfileOffset() != 0L) { setLogfileOffset(other.getLogfileOffset()); } - if (other.hasServerId()) { + if (other.getServerId() != 0L) { setServerId(other.getServerId()); } - if (other.hasServerenCode()) { - bitField0_ |= 0x00000010; + if (!other.getServerenCode().isEmpty()) { serverenCode_ = other.serverenCode_; + bitField0_ |= 0x00000010; onChanged(); } - if (other.hasExecuteTime()) { + if (other.getExecuteTime() != 0L) { setExecuteTime(other.getExecuteTime()); } - if (other.hasSourceType()) { - setSourceType(other.getSourceType()); - } - if (other.hasSchemaName()) { - bitField0_ |= 0x00000080; + if (!other.getSchemaName().isEmpty()) { schemaName_ = other.schemaName_; + bitField0_ |= 0x00000080; onChanged(); } - if (other.hasTableName()) { - bitField0_ |= 0x00000100; + if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; + bitField0_ |= 0x00000100; onChanged(); } - if (other.hasEventLength()) { + if (other.getEventLength() != 0L) { setEventLength(other.getEventLength()); } - if (other.hasEventType()) { - setEventType(other.getEventType()); - } if (propsBuilder_ == null) { if (!other.props_.isEmpty()) { if (props_.isEmpty()) { @@ -2671,7 +2939,7 @@ public Builder mergeFrom(Header other) { propsBuilder_ = null; props_ = other.props_; bitField0_ = (bitField0_ & ~0x00000800); - propsBuilder_ = + propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; } else { @@ -2679,132 +2947,279 @@ public Builder mergeFrom(Header other) { } } } - if (other.hasGtid()) { - bitField0_ |= 0x00001000; + if (!other.getGtid().isEmpty()) { gtid_ = other.gtid_; + bitField0_ |= 0x00001000; onChanged(); } + switch (other.getVersionPresentCase()) { + case VERSION: { + setVersion(other.getVersion()); + break; + } + case VERSIONPRESENT_NOT_SET: { + break; + } + } + switch (other.getSourceTypePresentCase()) { + case SOURCETYPE: { + setSourceTypeValue(other.getSourceTypeValue()); + break; + } + case SOURCETYPEPRESENT_NOT_SET: { + break; + } + } + switch (other.getEventTypePresentCase()) { + case EVENTTYPE: { + setEventTypeValue(other.getEventTypeValue()); + break; + } + case EVENTTYPEPRESENT_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); + 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 { - Header parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + versionPresent_ = input.readInt32(); + versionPresentCase_ = 1; + break; + } // case 8 + case 18: { + logfileName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + logfileOffset_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + serverId_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + serverenCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + executeTime_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + int rawValue = input.readEnum(); + sourceTypePresentCase_ = 7; + sourceTypePresent_ = rawValue; + break; + } // case 56 + case 66: { + schemaName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + tableName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: { + eventLength_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + int rawValue = input.readEnum(); + eventTypePresentCase_ = 11; + eventTypePresent_ = rawValue; + break; + } // case 88 + case 98: { + com.alibaba.otter.canal.protocol.CanalEntry.Pair m = + input.readMessage( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.parser(), + extensionRegistry); + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(m); + } else { + propsBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + gtid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Header) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally + return this; + } + private int versionPresentCase_ = 0; + private java.lang.Object versionPresent_; + public VersionPresentCase + getVersionPresentCase() { + return VersionPresentCase.forNumber( + versionPresentCase_); + } + + public Builder clearVersionPresent() { + versionPresentCase_ = 0; + versionPresent_ = null; + onChanged(); + return this; + } + + private int sourceTypePresentCase_ = 0; + private java.lang.Object sourceTypePresent_; + public SourceTypePresentCase + getSourceTypePresentCase() { + return SourceTypePresentCase.forNumber( + sourceTypePresentCase_); + } + + public Builder clearSourceTypePresent() { + sourceTypePresentCase_ = 0; + sourceTypePresent_ = null; + onChanged(); + return this; + } + + private int eventTypePresentCase_ = 0; + private java.lang.Object eventTypePresent_; + public EventTypePresentCase + getEventTypePresentCase() { + return EventTypePresentCase.forNumber( + eventTypePresentCase_); + } + + public Builder clearEventTypePresent() { + eventTypePresentCase_ = 0; + eventTypePresent_ = null; + onChanged(); return this; } + private int bitField0_; - private int version_ = 1; /** - * optional int32 version = 1 [default = 1]; - * - *
-       **协议的版本号*
-       * 
+ * int32 version = 1; + * @return Whether the version field is set. */ public boolean hasVersion() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return versionPresentCase_ == 1; } /** - * optional int32 version = 1 [default = 1]; - * - *
-       **协议的版本号*
-       * 
+ * int32 version = 1; + * @return The version. */ public int getVersion() { - return version_; + if (versionPresentCase_ == 1) { + return (java.lang.Integer) versionPresent_; + } + return 0; } /** - * optional int32 version = 1 [default = 1]; - * - *
-       **协议的版本号*
-       * 
+ * int32 version = 1; + * @param value The version to set. + * @return This builder for chaining. */ public Builder setVersion(int value) { - bitField0_ |= 0x00000001; - version_ = value; + + versionPresentCase_ = 1; + versionPresent_ = value; onChanged(); return this; } /** - * optional int32 version = 1 [default = 1]; - * - *
-       **协议的版本号*
-       * 
+ * int32 version = 1; + * @return This builder for chaining. */ public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000001); - version_ = 1; - onChanged(); + if (versionPresentCase_ == 1) { + versionPresentCase_ = 0; + versionPresent_ = null; + onChanged(); + } return this; } - private Object logfileName_ = ""; + private java.lang.Object logfileName_ = ""; /** - * optional string logfileName = 2; - * *
-       **binlog/redolog 文件名*
+       * *binlog/redolog 文件名*
        * 
- */ - public boolean hasLogfileName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string logfileName = 2; * - *
-       **binlog/redolog 文件名*
-       * 
+ * string logfileName = 2; + * @return The logfileName. */ - public String getLogfileName() { - Object ref = logfileName_; - if (!(ref instanceof String)) { + public java.lang.String getLogfileName() { + java.lang.Object ref = logfileName_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - logfileName_ = s; - } + java.lang.String s = bs.toStringUtf8(); + logfileName_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string logfileName = 2; - * *
-       **binlog/redolog 文件名*
+       * *binlog/redolog 文件名*
        * 
+ * + * string logfileName = 2; + * @return The bytes for logfileName. */ public com.google.protobuf.ByteString getLogfileNameBytes() { - Object ref = logfileName_; + java.lang.Object ref = logfileName_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); logfileName_ = b; return b; } else { @@ -2812,93 +3227,91 @@ public String getLogfileName() { } } /** - * optional string logfileName = 2; - * *
-       **binlog/redolog 文件名*
+       * *binlog/redolog 文件名*
        * 
+ * + * string logfileName = 2; + * @param value The logfileName to set. + * @return This builder for chaining. */ public Builder setLogfileName( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } logfileName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * optional string logfileName = 2; - * *
-       **binlog/redolog 文件名*
+       * *binlog/redolog 文件名*
        * 
+ * + * string logfileName = 2; + * @return This builder for chaining. */ public Builder clearLogfileName() { - bitField0_ = (bitField0_ & ~0x00000002); logfileName_ = getDefaultInstance().getLogfileName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** - * optional string logfileName = 2; - * *
-       **binlog/redolog 文件名*
+       * *binlog/redolog 文件名*
        * 
+ * + * string logfileName = 2; + * @param value The bytes for logfileName to set. + * @return This builder for chaining. */ public Builder setLogfileNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); logfileName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } private long logfileOffset_ ; /** - * optional int64 logfileOffset = 3; - * *
-       **binlog/redolog 文件的偏移位置*
+       * *binlog/redolog 文件的偏移位置*
        * 
- */ - public boolean hasLogfileOffset() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int64 logfileOffset = 3; * - *
-       **binlog/redolog 文件的偏移位置*
-       * 
+ * int64 logfileOffset = 3; + * @return The logfileOffset. */ + @java.lang.Override public long getLogfileOffset() { return logfileOffset_; } /** - * optional int64 logfileOffset = 3; - * *
-       **binlog/redolog 文件的偏移位置*
+       * *binlog/redolog 文件的偏移位置*
        * 
+ * + * int64 logfileOffset = 3; + * @param value The logfileOffset to set. + * @return This builder for chaining. */ public Builder setLogfileOffset(long value) { - bitField0_ |= 0x00000004; + logfileOffset_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * optional int64 logfileOffset = 3; - * *
-       **binlog/redolog 文件的偏移位置*
+       * *binlog/redolog 文件的偏移位置*
        * 
+ * + * int64 logfileOffset = 3; + * @return This builder for chaining. */ public Builder clearLogfileOffset() { bitField0_ = (bitField0_ & ~0x00000004); @@ -2909,44 +3322,40 @@ public Builder clearLogfileOffset() { private long serverId_ ; /** - * optional int64 serverId = 4; - * *
-       **服务端serverId*
+       * *服务端serverId*
        * 
- */ - public boolean hasServerId() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int64 serverId = 4; * - *
-       **服务端serverId*
-       * 
+ * int64 serverId = 4; + * @return The serverId. */ + @java.lang.Override public long getServerId() { return serverId_; } /** - * optional int64 serverId = 4; - * *
-       **服务端serverId*
+       * *服务端serverId*
        * 
+ * + * int64 serverId = 4; + * @param value The serverId to set. + * @return This builder for chaining. */ public Builder setServerId(long value) { - bitField0_ |= 0x00000008; + serverId_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** - * optional int64 serverId = 4; - * *
-       **服务端serverId*
+       * *服务端serverId*
        * 
+ * + * int64 serverId = 4; + * @return This builder for chaining. */ public Builder clearServerId() { bitField0_ = (bitField0_ & ~0x00000008); @@ -2955,52 +3364,42 @@ public Builder clearServerId() { return this; } - private Object serverenCode_ = ""; + private java.lang.Object serverenCode_ = ""; /** - * optional string serverenCode = 5; - * *
-       ** 变更数据的编码 *
+       * * 变更数据的编码 *
        * 
- */ - public boolean hasServerenCode() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional string serverenCode = 5; * - *
-       ** 变更数据的编码 *
-       * 
+ * string serverenCode = 5; + * @return The serverenCode. */ - public String getServerenCode() { - Object ref = serverenCode_; - if (!(ref instanceof String)) { + public java.lang.String getServerenCode() { + java.lang.Object ref = serverenCode_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - serverenCode_ = s; - } + java.lang.String s = bs.toStringUtf8(); + serverenCode_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string serverenCode = 5; - * *
-       ** 变更数据的编码 *
+       * * 变更数据的编码 *
        * 
+ * + * string serverenCode = 5; + * @return The bytes for serverenCode. */ public com.google.protobuf.ByteString getServerenCodeBytes() { - Object ref = serverenCode_; + java.lang.Object ref = serverenCode_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); serverenCode_ = b; return b; } else { @@ -3008,93 +3407,91 @@ public String getServerenCode() { } } /** - * optional string serverenCode = 5; - * *
-       ** 变更数据的编码 *
+       * * 变更数据的编码 *
        * 
+ * + * string serverenCode = 5; + * @param value The serverenCode to set. + * @return This builder for chaining. */ public Builder setServerenCode( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } serverenCode_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * optional string serverenCode = 5; - * *
-       ** 变更数据的编码 *
+       * * 变更数据的编码 *
        * 
+ * + * string serverenCode = 5; + * @return This builder for chaining. */ public Builder clearServerenCode() { - bitField0_ = (bitField0_ & ~0x00000010); serverenCode_ = getDefaultInstance().getServerenCode(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** - * optional string serverenCode = 5; - * *
-       ** 变更数据的编码 *
+       * * 变更数据的编码 *
        * 
+ * + * string serverenCode = 5; + * @param value The bytes for serverenCode to set. + * @return This builder for chaining. */ public Builder setServerenCodeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); serverenCode_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } private long executeTime_ ; /** - * optional int64 executeTime = 6; - * *
-       **变更数据的执行时间 *
+       * *变更数据的执行时间 *
        * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 executeTime = 6; * - *
-       **变更数据的执行时间 *
-       * 
+ * int64 executeTime = 6; + * @return The executeTime. */ + @java.lang.Override public long getExecuteTime() { return executeTime_; } /** - * optional int64 executeTime = 6; - * *
-       **变更数据的执行时间 *
+       * *变更数据的执行时间 *
        * 
+ * + * int64 executeTime = 6; + * @param value The executeTime to set. + * @return This builder for chaining. */ public Builder setExecuteTime(long value) { - bitField0_ |= 0x00000020; + executeTime_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } /** - * optional int64 executeTime = 6; - * *
-       **变更数据的执行时间 *
+       * *变更数据的执行时间 *
        * 
+ * + * int64 executeTime = 6; + * @return This builder for chaining. */ public Builder clearExecuteTime() { bitField0_ = (bitField0_ & ~0x00000020); @@ -3103,103 +3500,112 @@ public Builder clearExecuteTime() { return this; } - private Type sourceType_ = Type.MYSQL; /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-       ** 变更数据的来源*
-       * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return Whether the sourceType field is set. */ + @java.lang.Override public boolean hasSourceType() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return sourceTypePresentCase_ == 7; } /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-       ** 变更数据的来源*
-       * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return The enum numeric value on the wire for sourceType. */ - public Type getSourceType() { - return sourceType_; + @java.lang.Override + public int getSourceTypeValue() { + if (sourceTypePresentCase_ == 7) { + return ((java.lang.Integer) sourceTypePresent_).intValue(); + } + return 0; } /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-       ** 变更数据的来源*
-       * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @param value The enum numeric value on the wire for sourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceTypeValue(int value) { + sourceTypePresentCase_ = 7; + sourceTypePresent_ = value; + onChanged(); + return this; + } + /** + * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return The sourceType. + */ + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { + if (sourceTypePresentCase_ == 7) { + com.alibaba.otter.canal.protocol.CanalEntry.Type result = com.alibaba.otter.canal.protocol.CanalEntry.Type.forNumber( + (java.lang.Integer) sourceTypePresent_); + return result == null ? com.alibaba.otter.canal.protocol.CanalEntry.Type.UNRECOGNIZED : result; + } + return com.alibaba.otter.canal.protocol.CanalEntry.Type.TYPECOMPATIBLEPROTO2; + } + /** + * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @param value The sourceType to set. + * @return This builder for chaining. */ - public Builder setSourceType(Type value) { + public Builder setSourceType(com.alibaba.otter.canal.protocol.CanalEntry.Type value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; - sourceType_ = value; + sourceTypePresentCase_ = 7; + sourceTypePresent_ = value.getNumber(); onChanged(); return this; } /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-       ** 变更数据的来源*
-       * 
+ * .com.alibaba.otter.canal.protocol.Type sourceType = 7; + * @return This builder for chaining. */ public Builder clearSourceType() { - bitField0_ = (bitField0_ & ~0x00000040); - sourceType_ = Type.MYSQL; - onChanged(); + if (sourceTypePresentCase_ == 7) { + sourceTypePresentCase_ = 0; + sourceTypePresent_ = null; + onChanged(); + } return this; } - private Object schemaName_ = ""; + private java.lang.Object schemaName_ = ""; /** - * optional string schemaName = 8; - * *
-       ** 变更数据的schemaname*
+       * * 变更数据的schemaname*
        * 
- */ - public boolean hasSchemaName() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional string schemaName = 8; * - *
-       ** 变更数据的schemaname*
-       * 
+ * string schemaName = 8; + * @return The schemaName. */ - public String getSchemaName() { - Object ref = schemaName_; - if (!(ref instanceof String)) { + public java.lang.String getSchemaName() { + java.lang.Object ref = schemaName_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - schemaName_ = s; - } + java.lang.String s = bs.toStringUtf8(); + schemaName_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string schemaName = 8; - * *
-       ** 变更数据的schemaname*
+       * * 变更数据的schemaname*
        * 
+ * + * string schemaName = 8; + * @return The bytes for schemaName. */ public com.google.protobuf.ByteString getSchemaNameBytes() { - Object ref = schemaName_; + java.lang.Object ref = schemaName_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); schemaName_ = b; return b; } else { @@ -3207,99 +3613,91 @@ public String getSchemaName() { } } /** - * optional string schemaName = 8; - * *
-       ** 变更数据的schemaname*
+       * * 变更数据的schemaname*
        * 
+ * + * string schemaName = 8; + * @param value The schemaName to set. + * @return This builder for chaining. */ public Builder setSchemaName( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } schemaName_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } /** - * optional string schemaName = 8; - * *
-       ** 变更数据的schemaname*
+       * * 变更数据的schemaname*
        * 
+ * + * string schemaName = 8; + * @return This builder for chaining. */ public Builder clearSchemaName() { - bitField0_ = (bitField0_ & ~0x00000080); schemaName_ = getDefaultInstance().getSchemaName(); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** - * optional string schemaName = 8; - * *
-       ** 变更数据的schemaname*
+       * * 变更数据的schemaname*
        * 
+ * + * string schemaName = 8; + * @param value The bytes for schemaName to set. + * @return This builder for chaining. */ public Builder setSchemaNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); schemaName_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } - private Object tableName_ = ""; + private java.lang.Object tableName_ = ""; /** - * optional string tableName = 9; - * *
-       **变更数据的tablename*
+       * *变更数据的tablename*
        * 
- */ - public boolean hasTableName() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional string tableName = 9; * - *
-       **变更数据的tablename*
-       * 
+ * string tableName = 9; + * @return The tableName. */ - public String getTableName() { - Object ref = tableName_; - if (!(ref instanceof String)) { + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - tableName_ = s; - } + java.lang.String s = bs.toStringUtf8(); + tableName_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string tableName = 9; - * *
-       **变更数据的tablename*
+       * *变更数据的tablename*
        * 
+ * + * string tableName = 9; + * @return The bytes for tableName. */ public com.google.protobuf.ByteString getTableNameBytes() { - Object ref = tableName_; + java.lang.Object ref = tableName_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); tableName_ = b; return b; } else { @@ -3307,93 +3705,91 @@ public String getTableName() { } } /** - * optional string tableName = 9; - * *
-       **变更数据的tablename*
+       * *变更数据的tablename*
        * 
+ * + * string tableName = 9; + * @param value The tableName to set. + * @return This builder for chaining. */ public Builder setTableName( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } tableName_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } /** - * optional string tableName = 9; - * *
-       **变更数据的tablename*
+       * *变更数据的tablename*
        * 
+ * + * string tableName = 9; + * @return This builder for chaining. */ public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000100); tableName_ = getDefaultInstance().getTableName(); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } /** - * optional string tableName = 9; - * *
-       **变更数据的tablename*
+       * *变更数据的tablename*
        * 
+ * + * string tableName = 9; + * @param value The bytes for tableName to set. + * @return This builder for chaining. */ public Builder setTableNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); tableName_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } private long eventLength_ ; /** - * optional int64 eventLength = 10; - * *
-       **每个event的长度*
+       * *每个event的长度*
        * 
- */ - public boolean hasEventLength() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional int64 eventLength = 10; * - *
-       **每个event的长度*
-       * 
+ * int64 eventLength = 10; + * @return The eventLength. */ + @java.lang.Override public long getEventLength() { return eventLength_; } /** - * optional int64 eventLength = 10; - * *
-       **每个event的长度*
+       * *每个event的长度*
        * 
+ * + * int64 eventLength = 10; + * @param value The eventLength to set. + * @return This builder for chaining. */ public Builder setEventLength(long value) { - bitField0_ |= 0x00000200; + eventLength_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } /** - * optional int64 eventLength = 10; - * *
-       **每个event的长度*
+       * *每个event的长度*
        * 
+ * + * int64 eventLength = 10; + * @return This builder for chaining. */ public Builder clearEventLength() { bitField0_ = (bitField0_ & ~0x00000200); @@ -3402,77 +3798,96 @@ public Builder clearEventLength() { return this; } - private EventType eventType_ = EventType.UPDATE; /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return Whether the eventType field is set. */ + @java.lang.Override public boolean hasEventType() { - return ((bitField0_ & 0x00000400) == 0x00000400); + return eventTypePresentCase_ == 11; } /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return The enum numeric value on the wire for eventType. */ - public EventType getEventType() { - return eventType_; + @java.lang.Override + public int getEventTypeValue() { + if (eventTypePresentCase_ == 11) { + return ((java.lang.Integer) eventTypePresent_).intValue(); + } + return 0; } /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @param value The enum numeric value on the wire for eventType to set. + * @return This builder for chaining. + */ + public Builder setEventTypeValue(int value) { + eventTypePresentCase_ = 11; + eventTypePresent_ = value; + onChanged(); + return this; + } + /** + * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return The eventType. + */ + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { + if (eventTypePresentCase_ == 11) { + com.alibaba.otter.canal.protocol.CanalEntry.EventType result = com.alibaba.otter.canal.protocol.CanalEntry.EventType.forNumber( + (java.lang.Integer) eventTypePresent_); + return result == null ? com.alibaba.otter.canal.protocol.CanalEntry.EventType.UNRECOGNIZED : result; + } + return com.alibaba.otter.canal.protocol.CanalEntry.EventType.EVENTTYPECOMPATIBLEPROTO2; + } + /** + * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @param value The eventType to set. + * @return This builder for chaining. */ - public Builder setEventType(EventType value) { + public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; - eventType_ = value; + eventTypePresentCase_ = 11; + eventTypePresent_ = value.getNumber(); onChanged(); return this; } /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 11; + * @return This builder for chaining. */ public Builder clearEventType() { - bitField0_ = (bitField0_ & ~0x00000400); - eventType_ = EventType.UPDATE; - onChanged(); + if (eventTypePresentCase_ == 11) { + eventTypePresentCase_ = 0; + eventTypePresent_ = null; + onChanged(); + } return this; } - private java.util.List props_ = + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000800) == 0x00000800)) { - props_ = new java.util.ArrayList(props_); + if (!((bitField0_ & 0x00000800) != 0)) { + props_ = new java.util.ArrayList(props_); bitField0_ |= 0x00000800; } } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> propsBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public java.util.List getPropsList() { + public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); } else { @@ -3480,11 +3895,11 @@ public java.util.List getPropsList() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ public int getPropsCount() { if (propsBuilder_ == null) { @@ -3494,13 +3909,13 @@ public int getPropsCount() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public Pair getProps(int index) { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -3508,14 +3923,14 @@ public Pair getProps(int index) { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ public Builder setProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3529,14 +3944,14 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ public Builder setProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.set(index, builderForValue.build()); @@ -3547,13 +3962,13 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public Builder addProps(Pair value) { + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3567,14 +3982,14 @@ public Builder addProps(Pair value) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ public Builder addProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3588,14 +4003,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ public Builder addProps( - Pair.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(builderForValue.build()); @@ -3606,14 +4021,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ public Builder addProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(index, builderForValue.build()); @@ -3624,14 +4039,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ public Builder addAllProps( - Iterable values) { + java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -3643,11 +4058,11 @@ public Builder addAllProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ public Builder clearProps() { if (propsBuilder_ == null) { @@ -3660,11 +4075,11 @@ public Builder clearProps() { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ public Builder removeProps(int index) { if (propsBuilder_ == null) { @@ -3677,24 +4092,24 @@ public Builder removeProps(int index) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public Pair.Builder getPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public PairOrBuilder getPropsOrBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -3702,13 +4117,13 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public java.util.List + public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { return propsBuilder_.getMessageOrBuilderList(); @@ -3717,47 +4132,47 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public Pair.Builder addPropsBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( - Pair.getDefaultInstance()); + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public Pair.Builder addPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( - index, Pair.getDefaultInstance()); + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; */ - public java.util.List + public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> getPropsFieldBuilder() { if (propsBuilder_ == null) { propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( props_, - ((bitField0_ & 0x00000800) == 0x00000800), + ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); props_ = null; @@ -3765,52 +4180,42 @@ public Pair.Builder addPropsBuilder( return propsBuilder_; } - private Object gtid_ = ""; + private java.lang.Object gtid_ = ""; /** - * optional string gtid = 13; - * *
-       **当前事务的gitd*
+       * *当前事务的gitd*
        * 
- */ - public boolean hasGtid() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional string gtid = 13; * - *
-       **当前事务的gitd*
-       * 
+ * string gtid = 13; + * @return The gtid. */ - public String getGtid() { - Object ref = gtid_; - if (!(ref instanceof String)) { + public java.lang.String getGtid() { + java.lang.Object ref = gtid_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - gtid_ = s; - } + java.lang.String s = bs.toStringUtf8(); + gtid_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string gtid = 13; - * *
-       **当前事务的gitd*
+       * *当前事务的gitd*
        * 
+ * + * string gtid = 13; + * @return The bytes for gtid. */ public com.google.protobuf.ByteString getGtidBytes() { - Object ref = gtid_; + java.lang.Object ref = gtid_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); gtid_ = b; return b; } else { @@ -3818,49 +4223,51 @@ public String getGtid() { } } /** - * optional string gtid = 13; - * *
-       **当前事务的gitd*
+       * *当前事务的gitd*
        * 
+ * + * string gtid = 13; + * @param value The gtid to set. + * @return This builder for chaining. */ public Builder setGtid( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } gtid_ = value; + bitField0_ |= 0x00001000; onChanged(); return this; } /** - * optional string gtid = 13; - * *
-       **当前事务的gitd*
+       * *当前事务的gitd*
        * 
+ * + * string gtid = 13; + * @return This builder for chaining. */ public Builder clearGtid() { - bitField0_ = (bitField0_ & ~0x00001000); gtid_ = getDefaultInstance().getGtid(); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } /** - * optional string gtid = 13; - * *
-       **当前事务的gitd*
+       * *当前事务的gitd*
        * 
+ * + * string gtid = 13; + * @param value The bytes for gtid to set. + * @return This builder for chaining. */ public Builder setGtidBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); gtid_ = value; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -3868,12 +4275,52 @@ public Builder setGtidBytes( // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Header) } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Header) + private static final com.alibaba.otter.canal.protocol.CanalEntry.Header DEFAULT_INSTANCE; static { - defaultInstance = new Header(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalEntry.Header(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Header getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser
() { + @java.lang.Override + public Header parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser
parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Header getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Header) } public interface ColumnOrBuilder extends @@ -3881,476 +4328,327 @@ public interface ColumnOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int32 index = 1; - * *
-     **字段下标*
+     * *字段下标*
      * 
- */ - boolean hasIndex(); - /** - * optional int32 index = 1; * - *
-     **字段下标*
-     * 
+ * int32 index = 1; + * @return The index. */ int getIndex(); /** - * optional int32 sqlType = 2; - * *
-     **字段java中类型*
+     * *字段java中类型*
      * 
- */ - boolean hasSqlType(); - /** - * optional int32 sqlType = 2; * - *
-     **字段java中类型*
-     * 
+ * int32 sqlType = 2; + * @return The sqlType. */ int getSqlType(); /** - * optional string name = 3; - * *
-     **字段名称(忽略大小写),在mysql中是没有的*
+     * *字段名称(忽略大小写),在mysql中是没有的*
      * 
- */ - boolean hasName(); - /** - * optional string name = 3; * - *
-     **字段名称(忽略大小写),在mysql中是没有的*
-     * 
+ * string name = 3; + * @return The name. */ - String getName(); + java.lang.String getName(); /** - * optional string name = 3; - * *
-     **字段名称(忽略大小写),在mysql中是没有的*
+     * *字段名称(忽略大小写),在mysql中是没有的*
      * 
+ * + * string name = 3; + * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** - * optional bool isKey = 4; - * *
-     **是否是主键*
+     * *是否是主键*
      * 
- */ - boolean hasIsKey(); - /** - * optional bool isKey = 4; * - *
-     **是否是主键*
-     * 
+ * bool isKey = 4; + * @return The isKey. */ boolean getIsKey(); /** - * optional bool updated = 5; - * *
-     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
      * 
- */ - boolean hasUpdated(); - /** - * optional bool updated = 5; * - *
-     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-     * 
+ * bool updated = 5; + * @return The updated. */ boolean getUpdated(); /** - * optional bool isNull = 6 [default = false]; - * - *
-     ** 标识是否为空  *
-     * 
+ * bool isNull = 6; + * @return Whether the isNull field is set. */ boolean hasIsNull(); /** - * optional bool isNull = 6 [default = false]; - * - *
-     ** 标识是否为空  *
-     * 
+ * bool isNull = 6; + * @return The isNull. */ boolean getIsNull(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - java.util.List + java.util.List getPropsList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - Pair getProps(int index); + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ int getPropsCount(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - java.util.List + java.util.List getPropsOrBuilderList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - PairOrBuilder getPropsOrBuilder(int index); + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); /** - * optional string value = 8; - * *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * * 字段值,timestamp,Datetime是一个时间格式的文本 *
      * 
- */ - boolean hasValue(); - /** - * optional string value = 8; * - *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-     * 
+ * string value = 8; + * @return The value. */ - String getValue(); + java.lang.String getValue(); /** - * optional string value = 8; - * *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * * 字段值,timestamp,Datetime是一个时间格式的文本 *
      * 
+ * + * string value = 8; + * @return The bytes for value. */ com.google.protobuf.ByteString getValueBytes(); /** - * optional int32 length = 9; - * *
-     ** 对应数据对象原始长度 *
+     * * 对应数据对象原始长度 *
      * 
- */ - boolean hasLength(); - /** - * optional int32 length = 9; * - *
-     ** 对应数据对象原始长度 *
-     * 
+ * int32 length = 9; + * @return The length. */ int getLength(); /** - * optional string mysqlType = 10; - * *
-     **字段mysql类型*
+     * *字段mysql类型*
      * 
- */ - boolean hasMysqlType(); - /** - * optional string mysqlType = 10; * - *
-     **字段mysql类型*
-     * 
+ * string mysqlType = 10; + * @return The mysqlType. */ - String getMysqlType(); + java.lang.String getMysqlType(); /** - * optional string mysqlType = 10; - * *
-     **字段mysql类型*
+     * *字段mysql类型*
      * 
+ * + * string mysqlType = 10; + * @return The bytes for mysqlType. */ com.google.protobuf.ByteString getMysqlTypeBytes(); + + com.alibaba.otter.canal.protocol.CanalEntry.Column.IsNullPresentCase getIsNullPresentCase(); } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} - * *
-   **每个字段的数据结构*
+   * *每个字段的数据结构*
    * 
- */ - public static final class Column extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Column) - ColumnOrBuilder { - // Use Column.newBuilder() to construct. - private Column(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Column(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Column defaultInstance; - public static Column getDefaultInstance() { - return defaultInstance; - } - - public Column getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Column( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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 (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - index_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - sqlType_ = input.readInt32(); - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - name_ = bs; - break; - } - case 32: { - bitField0_ |= 0x00000008; - isKey_ = input.readBool(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - updated_ = input.readBool(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - isNull_ = input.readBool(); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - props_.add(input.readMessage(Pair.PARSER, extensionRegistry)); - break; - } - case 66: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000040; - value_ = bs; - break; - } - case 72: { - bitField0_ |= 0x00000080; - length_ = input.readInt32(); - break; - } - case 82: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000100; - mysqlType_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + * + * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} + */ + public static final class Column extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Column) + ColumnOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Column.class.getName()); + } + // Use Column.newBuilder() to construct. + private Column(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Column() { + name_ = ""; + props_ = java.util.Collections.emptyList(); + value_ = ""; + mysqlType_ = ""; } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable .ensureFieldAccessorsInitialized( - Column.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.Column.class, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Column parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Column(input, extensionRegistry); + private int isNullPresentCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object isNullPresent_; + public enum IsNullPresentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ISNULL(6), + ISNULLPRESENT_NOT_SET(0); + private final int value; + private IsNullPresentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IsNullPresentCase valueOf(int value) { + return forNumber(value); + } + + public static IsNullPresentCase forNumber(int value) { + switch (value) { + case 6: return ISNULL; + case 0: return ISNULLPRESENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; } }; - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public IsNullPresentCase + getIsNullPresentCase() { + return IsNullPresentCase.forNumber( + isNullPresentCase_); } - private int bitField0_; public static final int INDEX_FIELD_NUMBER = 1; - private int index_; + private int index_ = 0; /** - * optional int32 index = 1; - * *
-     **字段下标*
+     * *字段下标*
      * 
- */ - public boolean hasIndex() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 index = 1; * - *
-     **字段下标*
-     * 
+ * int32 index = 1; + * @return The index. */ + @java.lang.Override public int getIndex() { return index_; } public static final int SQLTYPE_FIELD_NUMBER = 2; - private int sqlType_; + private int sqlType_ = 0; /** - * optional int32 sqlType = 2; - * *
-     **字段java中类型*
+     * *字段java中类型*
      * 
- */ - public boolean hasSqlType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 sqlType = 2; * - *
-     **字段java中类型*
-     * 
+ * int32 sqlType = 2; + * @return The sqlType. */ + @java.lang.Override public int getSqlType() { return sqlType_; } public static final int NAME_FIELD_NUMBER = 3; - private Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** - * optional string name = 3; - * *
-     **字段名称(忽略大小写),在mysql中是没有的*
+     * *字段名称(忽略大小写),在mysql中是没有的*
      * 
- */ - public boolean hasName() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string name = 3; * - *
-     **字段名称(忽略大小写),在mysql中是没有的*
-     * 
+ * string name = 3; + * @return The name. */ - public String getName() { - Object ref = name_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + java.lang.String s = bs.toStringUtf8(); + name_ = s; return s; } } /** - * optional string name = 3; - * *
-     **字段名称(忽略大小写),在mysql中是没有的*
+     * *字段名称(忽略大小写),在mysql中是没有的*
      * 
+ * + * string name = 3; + * @return The bytes for name. */ + @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { - Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); name_ = b; return b; } else { @@ -4359,176 +4657,157 @@ public String getName() { } public static final int ISKEY_FIELD_NUMBER = 4; - private boolean isKey_; + private boolean isKey_ = false; /** - * optional bool isKey = 4; - * *
-     **是否是主键*
+     * *是否是主键*
      * 
- */ - public boolean hasIsKey() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool isKey = 4; * - *
-     **是否是主键*
-     * 
+ * bool isKey = 4; + * @return The isKey. */ + @java.lang.Override public boolean getIsKey() { return isKey_; } public static final int UPDATED_FIELD_NUMBER = 5; - private boolean updated_; + private boolean updated_ = false; /** - * optional bool updated = 5; - * *
-     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
      * 
- */ - public boolean hasUpdated() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional bool updated = 5; * - *
-     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-     * 
+ * bool updated = 5; + * @return The updated. */ + @java.lang.Override public boolean getUpdated() { return updated_; } public static final int ISNULL_FIELD_NUMBER = 6; - private boolean isNull_; /** - * optional bool isNull = 6 [default = false]; - * - *
-     ** 标识是否为空  *
-     * 
+ * bool isNull = 6; + * @return Whether the isNull field is set. */ + @java.lang.Override public boolean hasIsNull() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return isNullPresentCase_ == 6; } /** - * optional bool isNull = 6 [default = false]; - * - *
-     ** 标识是否为空  *
-     * 
+ * bool isNull = 6; + * @return The isNull. */ + @java.lang.Override public boolean getIsNull() { - return isNull_; + if (isNullPresentCase_ == 6) { + return (java.lang.Boolean) isNullPresent_; + } + return false; } public static final int PROPS_FIELD_NUMBER = 7; - private java.util.List props_; + @SuppressWarnings("serial") + private java.util.List props_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public java.util.List getPropsList() { + @java.lang.Override + public java.util.List getPropsList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public java.util.List + @java.lang.Override + public java.util.List getPropsOrBuilderList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ + @java.lang.Override public int getPropsCount() { return props_.size(); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public Pair getProps(int index) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public PairOrBuilder getPropsOrBuilder( + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } public static final int VALUE_FIELD_NUMBER = 8; - private Object value_; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; /** - * optional string value = 8; - * *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * * 字段值,timestamp,Datetime是一个时间格式的文本 *
      * 
- */ - public boolean hasValue() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional string value = 8; * - *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-     * 
+ * string value = 8; + * @return The value. */ - public String getValue() { - Object ref = value_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } + java.lang.String s = bs.toStringUtf8(); + value_ = s; return s; } } /** - * optional string value = 8; - * *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * * 字段值,timestamp,Datetime是一个时间格式的文本 *
      * 
+ * + * string value = 8; + * @return The bytes for value. */ + @java.lang.Override public com.google.protobuf.ByteString getValueBytes() { - Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); value_ = b; return b; } else { @@ -4537,75 +4816,60 @@ public String getValue() { } public static final int LENGTH_FIELD_NUMBER = 9; - private int length_; + private int length_ = 0; /** - * optional int32 length = 9; - * *
-     ** 对应数据对象原始长度 *
+     * * 对应数据对象原始长度 *
      * 
- */ - public boolean hasLength() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional int32 length = 9; * - *
-     ** 对应数据对象原始长度 *
-     * 
+ * int32 length = 9; + * @return The length. */ + @java.lang.Override public int getLength() { return length_; } public static final int MYSQLTYPE_FIELD_NUMBER = 10; - private Object mysqlType_; + @SuppressWarnings("serial") + private volatile java.lang.Object mysqlType_ = ""; /** - * optional string mysqlType = 10; - * *
-     **字段mysql类型*
+     * *字段mysql类型*
      * 
- */ - public boolean hasMysqlType() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional string mysqlType = 10; * - *
-     **字段mysql类型*
-     * 
+ * string mysqlType = 10; + * @return The mysqlType. */ - public String getMysqlType() { - Object ref = mysqlType_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getMysqlType() { + java.lang.Object ref = mysqlType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - mysqlType_ = s; - } + java.lang.String s = bs.toStringUtf8(); + mysqlType_ = s; return s; } } /** - * optional string mysqlType = 10; - * *
-     **字段mysql类型*
+     * *字段mysql类型*
      * 
+ * + * string mysqlType = 10; + * @return The bytes for mysqlType. */ + @java.lang.Override public com.google.protobuf.ByteString getMysqlTypeBytes() { - Object ref = mysqlType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = mysqlType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); mysqlType_ = b; return b; } else { @@ -4613,19 +4877,8 @@ public String getMysqlType() { } } - private void initFields() { - index_ = 0; - sqlType_ = 0; - name_ = ""; - isKey_ = false; - updated_ = false; - isNull_ = false; - props_ = java.util.Collections.emptyList(); - value_ = ""; - length_ = 0; - mysqlType_ = ""; - } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -4635,288 +4888,359 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (index_ != 0) { output.writeInt32(1, index_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (sqlType_ != 0) { output.writeInt32(2, sqlType_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, name_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (isKey_ != false) { output.writeBool(4, isKey_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (updated_ != false) { output.writeBool(5, updated_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBool(6, isNull_); + if (isNullPresentCase_ == 6) { + output.writeBool( + 6, (boolean)((java.lang.Boolean) isNullPresent_)); } for (int i = 0; i < props_.size(); i++) { output.writeMessage(7, props_.get(i)); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(8, getValueBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, value_); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (length_ != 0) { output.writeInt32(9, length_); } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeBytes(10, getMysqlTypeBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mysqlType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, mysqlType_); } getUnknownFields().writeTo(output); } - private int memoizedSerializedSize = -1; + @java.lang.Override public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (index_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, index_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (sqlType_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, sqlType_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, name_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (isKey_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, isKey_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (updated_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, updated_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (isNullPresentCase_ == 6) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, isNull_); + .computeBoolSize( + 6, (boolean)((java.lang.Boolean) isNullPresent_)); } for (int i = 0; i < props_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, props_.get(i)); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, getValueBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, value_); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (length_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(9, length_); } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, getMysqlTypeBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mysqlType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, mysqlType_); } size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; + memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalEntry.Column)) { + return super.equals(obj); + } + com.alibaba.otter.canal.protocol.CanalEntry.Column other = (com.alibaba.otter.canal.protocol.CanalEntry.Column) obj; + + if (getIndex() + != other.getIndex()) return false; + if (getSqlType() + != other.getSqlType()) return false; + if (!getName() + .equals(other.getName())) return false; + if (getIsKey() + != other.getIsKey()) return false; + if (getUpdated() + != other.getUpdated()) return false; + if (!getPropsList() + .equals(other.getPropsList())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (getLength() + != other.getLength()) return false; + if (!getMysqlType() + .equals(other.getMysqlType())) return false; + if (!getIsNullPresentCase().equals(other.getIsNullPresentCase())) return false; + switch (isNullPresentCase_) { + case 6: + if (getIsNull() + != other.getIsNull()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - public static Column parseFrom( + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex(); + hash = (37 * hash) + SQLTYPE_FIELD_NUMBER; + hash = (53 * hash) + getSqlType(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ISKEY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsKey()); + hash = (37 * hash) + UPDATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUpdated()); + if (getPropsCount() > 0) { + hash = (37 * hash) + PROPS_FIELD_NUMBER; + hash = (53 * hash) + getPropsList().hashCode(); + } + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getLength(); + hash = (37 * hash) + MYSQLTYPE_FIELD_NUMBER; + hash = (53 * hash) + getMysqlType().hashCode(); + switch (isNullPresentCase_) { + case 6: + hash = (37 * hash) + ISNULL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsNull()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Column parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Column parseFrom(byte[] data) + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Column parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Column parseFrom(java.io.InputStream input) + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static Column parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Column parseDelimitedFrom(java.io.InputStream input) + + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); } - public static Column parseDelimitedFrom( + + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static Column parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static Column parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(Column prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Column prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} - * *
-     **每个字段的数据结构*
+     * *每个字段的数据结构*
      * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Column) - ColumnOrBuilder { + com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable .ensureFieldAccessorsInitialized( - Column.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.Column.class, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder.class); } // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Column.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPropsFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; index_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); sqlType_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); name_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); isKey_ = false; - bitField0_ = (bitField0_ & ~0x00000008); updated_ = false; - bitField0_ = (bitField0_ & ~0x00000010); - isNull_ = false; - bitField0_ = (bitField0_ & ~0x00000020); if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + props_ = null; propsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); value_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); length_ = 0; - bitField0_ = (bitField0_ & ~0x00000100); mysqlType_ = ""; - bitField0_ = (bitField0_ & ~0x00000200); + isNullPresentCase_ = 0; + isNullPresent_ = null; return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; } - public Column getDefaultInstanceForType() { - return Column.getDefaultInstance(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Column getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance(); } - public Column build() { - Column result = buildPartial(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Column build() { + com.alibaba.otter.canal.protocol.CanalEntry.Column result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Column buildPartial() { - Column result = new Column(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.index_ = index_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.sqlType_ = sqlType_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.isKey_ = isKey_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.updated_ = updated_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.isNull_ = isNull_; + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Column buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.Column result = new com.alibaba.otter.canal.protocol.CanalEntry.Column(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.alibaba.otter.canal.protocol.CanalEntry.Column result) { if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (((bitField0_ & 0x00000040) != 0)) { props_ = java.util.Collections.unmodifiableList(props_); bitField0_ = (bitField0_ & ~0x00000040); } @@ -4924,54 +5248,70 @@ public Column buildPartial() { } else { result.props_ = propsBuilder_.build(); } - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; + } + + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalEntry.Column result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sqlType_ = sqlType_; } - result.value_ = value_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000080; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; } - result.length_ = length_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000100; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.isKey_ = isKey_; } - result.mysqlType_ = mysqlType_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updated_ = updated_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.length_ = length_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.mysqlType_ = mysqlType_; + } + } + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalEntry.Column result) { + result.isNullPresentCase_ = isNullPresentCase_; + result.isNullPresent_ = this.isNullPresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Column) { - return mergeFrom((Column)other); + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Column) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Column)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Column other) { - if (other == Column.getDefaultInstance()) return this; - if (other.hasIndex()) { + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Column other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()) return this; + if (other.getIndex() != 0) { setIndex(other.getIndex()); } - if (other.hasSqlType()) { + if (other.getSqlType() != 0) { setSqlType(other.getSqlType()); } - if (other.hasName()) { - bitField0_ |= 0x00000004; + if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000004; onChanged(); } - if (other.hasIsKey()) { + if (other.getIsKey() != false) { setIsKey(other.getIsKey()); } - if (other.hasUpdated()) { + if (other.getUpdated() != false) { setUpdated(other.getUpdated()); } - if (other.hasIsNull()) { - setIsNull(other.getIsNull()); - } if (propsBuilder_ == null) { if (!other.props_.isEmpty()) { if (props_.isEmpty()) { @@ -4990,7 +5330,7 @@ public Builder mergeFrom(Column other) { propsBuilder_ = null; props_ = other.props_; bitField0_ = (bitField0_ & ~0x00000040); - propsBuilder_ = + propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; } else { @@ -4998,86 +5338,180 @@ public Builder mergeFrom(Column other) { } } } - if (other.hasValue()) { - bitField0_ |= 0x00000080; + if (!other.getValue().isEmpty()) { value_ = other.value_; + bitField0_ |= 0x00000080; onChanged(); } - if (other.hasLength()) { + if (other.getLength() != 0) { setLength(other.getLength()); } - if (other.hasMysqlType()) { - bitField0_ |= 0x00000200; + if (!other.getMysqlType().isEmpty()) { mysqlType_ = other.mysqlType_; + bitField0_ |= 0x00000200; onChanged(); } + switch (other.getIsNullPresentCase()) { + case ISNULL: { + setIsNull(other.getIsNull()); + break; + } + case ISNULLPRESENT_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); + 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 { - Column parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + index_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + sqlType_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + isKey_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + updated_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + isNullPresent_ = input.readBool(); + isNullPresentCase_ = 6; + break; + } // case 48 + case 58: { + com.alibaba.otter.canal.protocol.CanalEntry.Pair m = + input.readMessage( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.parser(), + extensionRegistry); + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(m); + } else { + propsBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: { + length_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + mysqlType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Column) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally + return this; + } + private int isNullPresentCase_ = 0; + private java.lang.Object isNullPresent_; + public IsNullPresentCase + getIsNullPresentCase() { + return IsNullPresentCase.forNumber( + isNullPresentCase_); + } + + public Builder clearIsNullPresent() { + isNullPresentCase_ = 0; + isNullPresent_ = null; + onChanged(); return this; } + private int bitField0_; private int index_ ; /** - * optional int32 index = 1; - * *
-       **字段下标*
+       * *字段下标*
        * 
- */ - public boolean hasIndex() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 index = 1; * - *
-       **字段下标*
-       * 
+ * int32 index = 1; + * @return The index. */ + @java.lang.Override public int getIndex() { return index_; } /** - * optional int32 index = 1; - * *
-       **字段下标*
+       * *字段下标*
        * 
+ * + * int32 index = 1; + * @param value The index to set. + * @return This builder for chaining. */ public Builder setIndex(int value) { - bitField0_ |= 0x00000001; + index_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional int32 index = 1; - * *
-       **字段下标*
+       * *字段下标*
        * 
+ * + * int32 index = 1; + * @return This builder for chaining. */ public Builder clearIndex() { bitField0_ = (bitField0_ & ~0x00000001); @@ -5088,44 +5522,40 @@ public Builder clearIndex() { private int sqlType_ ; /** - * optional int32 sqlType = 2; - * *
-       **字段java中类型*
+       * *字段java中类型*
        * 
- */ - public boolean hasSqlType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 sqlType = 2; * - *
-       **字段java中类型*
-       * 
+ * int32 sqlType = 2; + * @return The sqlType. */ + @java.lang.Override public int getSqlType() { return sqlType_; } /** - * optional int32 sqlType = 2; - * *
-       **字段java中类型*
+       * *字段java中类型*
        * 
+ * + * int32 sqlType = 2; + * @param value The sqlType to set. + * @return This builder for chaining. */ public Builder setSqlType(int value) { - bitField0_ |= 0x00000002; + sqlType_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * optional int32 sqlType = 2; - * *
-       **字段java中类型*
+       * *字段java中类型*
        * 
+ * + * int32 sqlType = 2; + * @return This builder for chaining. */ public Builder clearSqlType() { bitField0_ = (bitField0_ & ~0x00000002); @@ -5134,52 +5564,42 @@ public Builder clearSqlType() { return this; } - private Object name_ = ""; + private java.lang.Object name_ = ""; /** - * optional string name = 3; - * *
-       **字段名称(忽略大小写),在mysql中是没有的*
+       * *字段名称(忽略大小写),在mysql中是没有的*
        * 
- */ - public boolean hasName() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string name = 3; * - *
-       **字段名称(忽略大小写),在mysql中是没有的*
-       * 
+ * string name = 3; + * @return The name. */ - public String getName() { - Object ref = name_; - if (!(ref instanceof String)) { + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + java.lang.String s = bs.toStringUtf8(); + name_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string name = 3; - * *
-       **字段名称(忽略大小写),在mysql中是没有的*
+       * *字段名称(忽略大小写),在mysql中是没有的*
        * 
+ * + * string name = 3; + * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { - Object ref = name_; + java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); name_ = b; return b; } else { @@ -5187,93 +5607,91 @@ public String getName() { } } /** - * optional string name = 3; - * *
-       **字段名称(忽略大小写),在mysql中是没有的*
+       * *字段名称(忽略大小写),在mysql中是没有的*
        * 
+ * + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. */ public Builder setName( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * optional string name = 3; - * *
-       **字段名称(忽略大小写),在mysql中是没有的*
+       * *字段名称(忽略大小写),在mysql中是没有的*
        * 
+ * + * string name = 3; + * @return This builder for chaining. */ public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000004); name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** - * optional string name = 3; - * *
-       **字段名称(忽略大小写),在mysql中是没有的*
+       * *字段名称(忽略大小写),在mysql中是没有的*
        * 
+ * + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } private boolean isKey_ ; /** - * optional bool isKey = 4; - * *
-       **是否是主键*
+       * *是否是主键*
        * 
- */ - public boolean hasIsKey() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional bool isKey = 4; * - *
-       **是否是主键*
-       * 
+ * bool isKey = 4; + * @return The isKey. */ + @java.lang.Override public boolean getIsKey() { return isKey_; } /** - * optional bool isKey = 4; - * *
-       **是否是主键*
+       * *是否是主键*
        * 
+ * + * bool isKey = 4; + * @param value The isKey to set. + * @return This builder for chaining. */ public Builder setIsKey(boolean value) { - bitField0_ |= 0x00000008; + isKey_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** - * optional bool isKey = 4; - * *
-       **是否是主键*
+       * *是否是主键*
        * 
+ * + * bool isKey = 4; + * @return This builder for chaining. */ public Builder clearIsKey() { bitField0_ = (bitField0_ & ~0x00000008); @@ -5284,44 +5702,40 @@ public Builder clearIsKey() { private boolean updated_ ; /** - * optional bool updated = 5; - * *
-       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
        * 
- */ - public boolean hasUpdated() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional bool updated = 5; * - *
-       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-       * 
+ * bool updated = 5; + * @return The updated. */ + @java.lang.Override public boolean getUpdated() { return updated_; } /** - * optional bool updated = 5; - * *
-       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
        * 
+ * + * bool updated = 5; + * @param value The updated to set. + * @return This builder for chaining. */ public Builder setUpdated(boolean value) { - bitField0_ |= 0x00000010; + updated_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * optional bool updated = 5; - * *
-       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
        * 
+ * + * bool updated = 5; + * @return This builder for chaining. */ public Builder clearUpdated() { bitField0_ = (bitField0_ & ~0x00000010); @@ -5330,74 +5744,68 @@ public Builder clearUpdated() { return this; } - private boolean isNull_ ; /** - * optional bool isNull = 6 [default = false]; - * - *
-       ** 标识是否为空  *
-       * 
+ * bool isNull = 6; + * @return Whether the isNull field is set. */ public boolean hasIsNull() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return isNullPresentCase_ == 6; } /** - * optional bool isNull = 6 [default = false]; - * - *
-       ** 标识是否为空  *
-       * 
+ * bool isNull = 6; + * @return The isNull. */ public boolean getIsNull() { - return isNull_; + if (isNullPresentCase_ == 6) { + return (java.lang.Boolean) isNullPresent_; + } + return false; } /** - * optional bool isNull = 6 [default = false]; - * - *
-       ** 标识是否为空  *
-       * 
+ * bool isNull = 6; + * @param value The isNull to set. + * @return This builder for chaining. */ public Builder setIsNull(boolean value) { - bitField0_ |= 0x00000020; - isNull_ = value; + + isNullPresentCase_ = 6; + isNullPresent_ = value; onChanged(); return this; } /** - * optional bool isNull = 6 [default = false]; - * - *
-       ** 标识是否为空  *
-       * 
+ * bool isNull = 6; + * @return This builder for chaining. */ public Builder clearIsNull() { - bitField0_ = (bitField0_ & ~0x00000020); - isNull_ = false; - onChanged(); + if (isNullPresentCase_ == 6) { + isNullPresentCase_ = 0; + isNullPresent_ = null; + onChanged(); + } return this; } - private java.util.List props_ = + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - props_ = new java.util.ArrayList(props_); + if (!((bitField0_ & 0x00000040) != 0)) { + props_ = new java.util.ArrayList(props_); bitField0_ |= 0x00000040; } } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> propsBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public java.util.List getPropsList() { + public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); } else { @@ -5405,11 +5813,11 @@ public java.util.List getPropsList() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ public int getPropsCount() { if (propsBuilder_ == null) { @@ -5419,13 +5827,13 @@ public int getPropsCount() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public Pair getProps(int index) { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -5433,14 +5841,14 @@ public Pair getProps(int index) { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ public Builder setProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5454,14 +5862,14 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ public Builder setProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.set(index, builderForValue.build()); @@ -5472,13 +5880,13 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public Builder addProps(Pair value) { + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5492,14 +5900,14 @@ public Builder addProps(Pair value) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ public Builder addProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5513,14 +5921,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ public Builder addProps( - Pair.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(builderForValue.build()); @@ -5531,14 +5939,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ public Builder addProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(index, builderForValue.build()); @@ -5549,14 +5957,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ public Builder addAllProps( - Iterable values) { + java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -5568,11 +5976,11 @@ public Builder addAllProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ public Builder clearProps() { if (propsBuilder_ == null) { @@ -5585,11 +5993,11 @@ public Builder clearProps() { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ public Builder removeProps(int index) { if (propsBuilder_ == null) { @@ -5602,24 +6010,24 @@ public Builder removeProps(int index) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public Pair.Builder getPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public PairOrBuilder getPropsOrBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -5627,13 +6035,13 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public java.util.List + public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { return propsBuilder_.getMessageOrBuilderList(); @@ -5642,47 +6050,47 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public Pair.Builder addPropsBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( - Pair.getDefaultInstance()); + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public Pair.Builder addPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( - index, Pair.getDefaultInstance()); + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; */ - public java.util.List + public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> getPropsFieldBuilder() { if (propsBuilder_ == null) { propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( props_, - ((bitField0_ & 0x00000040) == 0x00000040), + ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); props_ = null; @@ -5690,52 +6098,42 @@ public Pair.Builder addPropsBuilder( return propsBuilder_; } - private Object value_ = ""; + private java.lang.Object value_ = ""; /** - * optional string value = 8; - * *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * * 字段值,timestamp,Datetime是一个时间格式的文本 *
        * 
- */ - public boolean hasValue() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional string value = 8; * - *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-       * 
+ * string value = 8; + * @return The value. */ - public String getValue() { - Object ref = value_; - if (!(ref instanceof String)) { + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } + java.lang.String s = bs.toStringUtf8(); + value_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string value = 8; - * *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * * 字段值,timestamp,Datetime是一个时间格式的文本 *
        * 
+ * + * string value = 8; + * @return The bytes for value. */ public com.google.protobuf.ByteString getValueBytes() { - Object ref = value_; + java.lang.Object ref = value_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); value_ = b; return b; } else { @@ -5743,93 +6141,91 @@ public String getValue() { } } /** - * optional string value = 8; - * *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * * 字段值,timestamp,Datetime是一个时间格式的文本 *
        * 
+ * + * string value = 8; + * @param value The value to set. + * @return This builder for chaining. */ public Builder setValue( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } value_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } /** - * optional string value = 8; - * *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * * 字段值,timestamp,Datetime是一个时间格式的文本 *
        * 
+ * + * string value = 8; + * @return This builder for chaining. */ public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000080); value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** - * optional string value = 8; - * *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * * 字段值,timestamp,Datetime是一个时间格式的文本 *
        * 
+ * + * string value = 8; + * @param value The bytes for value to set. + * @return This builder for chaining. */ public Builder setValueBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); value_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } private int length_ ; /** - * optional int32 length = 9; - * *
-       ** 对应数据对象原始长度 *
+       * * 对应数据对象原始长度 *
        * 
- */ - public boolean hasLength() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional int32 length = 9; * - *
-       ** 对应数据对象原始长度 *
-       * 
+ * int32 length = 9; + * @return The length. */ + @java.lang.Override public int getLength() { return length_; } /** - * optional int32 length = 9; - * *
-       ** 对应数据对象原始长度 *
+       * * 对应数据对象原始长度 *
        * 
+ * + * int32 length = 9; + * @param value The length to set. + * @return This builder for chaining. */ public Builder setLength(int value) { - bitField0_ |= 0x00000100; + length_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } /** - * optional int32 length = 9; - * *
-       ** 对应数据对象原始长度 *
+       * * 对应数据对象原始长度 *
        * 
+ * + * int32 length = 9; + * @return This builder for chaining. */ public Builder clearLength() { bitField0_ = (bitField0_ & ~0x00000100); @@ -5838,52 +6234,42 @@ public Builder clearLength() { return this; } - private Object mysqlType_ = ""; + private java.lang.Object mysqlType_ = ""; /** - * optional string mysqlType = 10; - * *
-       **字段mysql类型*
+       * *字段mysql类型*
        * 
- */ - public boolean hasMysqlType() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional string mysqlType = 10; * - *
-       **字段mysql类型*
-       * 
+ * string mysqlType = 10; + * @return The mysqlType. */ - public String getMysqlType() { - Object ref = mysqlType_; - if (!(ref instanceof String)) { + public java.lang.String getMysqlType() { + java.lang.Object ref = mysqlType_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - mysqlType_ = s; - } + java.lang.String s = bs.toStringUtf8(); + mysqlType_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string mysqlType = 10; - * *
-       **字段mysql类型*
+       * *字段mysql类型*
        * 
+ * + * string mysqlType = 10; + * @return The bytes for mysqlType. */ public com.google.protobuf.ByteString getMysqlTypeBytes() { - Object ref = mysqlType_; + java.lang.Object ref = mysqlType_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); mysqlType_ = b; return b; } else { @@ -5891,49 +6277,51 @@ public String getMysqlType() { } } /** - * optional string mysqlType = 10; - * *
-       **字段mysql类型*
+       * *字段mysql类型*
        * 
+ * + * string mysqlType = 10; + * @param value The mysqlType to set. + * @return This builder for chaining. */ public Builder setMysqlType( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } mysqlType_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } /** - * optional string mysqlType = 10; - * *
-       **字段mysql类型*
+       * *字段mysql类型*
        * 
+ * + * string mysqlType = 10; + * @return This builder for chaining. */ public Builder clearMysqlType() { - bitField0_ = (bitField0_ & ~0x00000200); mysqlType_ = getDefaultInstance().getMysqlType(); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } /** - * optional string mysqlType = 10; - * *
-       **字段mysql类型*
+       * *字段mysql类型*
        * 
+ * + * string mysqlType = 10; + * @param value The bytes for mysqlType to set. + * @return This builder for chaining. */ public Builder setMysqlTypeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); mysqlType_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5941,12 +6329,52 @@ public Builder setMysqlTypeBytes( // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Column) } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Column) + private static final com.alibaba.otter.canal.protocol.CanalEntry.Column DEFAULT_INSTANCE; static { - defaultInstance = new Column(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalEntry.Column(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Column getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Column parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Column getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Column) } public interface RowDataOrBuilder extends @@ -5954,133 +6382,136 @@ public interface RowDataOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - java.util.List + java.util.List getBeforeColumnsList(); /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - Column getBeforeColumns(int index); + com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index); /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ int getBeforeColumnsCount(); /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - java.util.List + java.util.List getBeforeColumnsOrBuilderList(); /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - ColumnOrBuilder getBeforeColumnsOrBuilder(int index); + com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( + int index); /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - java.util.List + java.util.List getAfterColumnsList(); /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - Column getAfterColumns(int index); + com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index); /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ int getAfterColumnsCount(); /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - java.util.List + java.util.List getAfterColumnsOrBuilderList(); /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - ColumnOrBuilder getAfterColumnsOrBuilder(int index); + com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( + int index); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - java.util.List + java.util.List getPropsList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - Pair getProps(int index); + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ int getPropsCount(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - java.util.List + java.util.List getPropsOrBuilderList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - PairOrBuilder getPropsOrBuilder(int index); + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.RowData} @@ -6089,294 +6520,224 @@ public static final class RowData extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowData) RowDataOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + RowData.class.getName()); + } // Use RowData.newBuilder() to construct. private RowData(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private RowData(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final RowData defaultInstance; - public static RowData getDefaultInstance() { - return defaultInstance; } - - public RowData getDefaultInstanceForType() { - return defaultInstance; + private RowData() { + beforeColumns_ = java.util.Collections.emptyList(); + afterColumns_ = java.util.Collections.emptyList(); + props_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RowData( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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 (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - beforeColumns_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - beforeColumns_.add(input.readMessage(Column.PARSER, extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - afterColumns_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - afterColumns_.add(input.readMessage(Column.PARSER, extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - props_.add(input.readMessage(Pair.PARSER, extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - beforeColumns_ = java.util.Collections.unmodifiableList(beforeColumns_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - afterColumns_ = java.util.Collections.unmodifiableList(afterColumns_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable .ensureFieldAccessorsInitialized( - RowData.class, Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RowData parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RowData(input, extensionRegistry); - } - }; - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + com.alibaba.otter.canal.protocol.CanalEntry.RowData.class, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder.class); } public static final int BEFORECOLUMNS_FIELD_NUMBER = 1; - private java.util.List beforeColumns_; + @SuppressWarnings("serial") + private java.util.List beforeColumns_; /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public java.util.List getBeforeColumnsList() { + @java.lang.Override + public java.util.List getBeforeColumnsList() { return beforeColumns_; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public java.util.List + @java.lang.Override + public java.util.List getBeforeColumnsOrBuilderList() { return beforeColumns_; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ + @java.lang.Override public int getBeforeColumnsCount() { return beforeColumns_.size(); } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public Column getBeforeColumns(int index) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { return beforeColumns_.get(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-     ** 字段信息,增量数据(修改前,删除前) *
+     * * 字段信息,增量数据(修改前,删除前) *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public ColumnOrBuilder getBeforeColumnsOrBuilder( + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( int index) { return beforeColumns_.get(index); } public static final int AFTERCOLUMNS_FIELD_NUMBER = 2; - private java.util.List afterColumns_; + @SuppressWarnings("serial") + private java.util.List afterColumns_; /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public java.util.List getAfterColumnsList() { + @java.lang.Override + public java.util.List getAfterColumnsList() { return afterColumns_; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public java.util.List + @java.lang.Override + public java.util.List getAfterColumnsOrBuilderList() { return afterColumns_; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ + @java.lang.Override public int getAfterColumnsCount() { return afterColumns_.size(); } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public Column getAfterColumns(int index) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { return afterColumns_.get(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-     ** 字段信息,增量数据(修改后,新增后)  *
+     * * 字段信息,增量数据(修改后,新增后)  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public ColumnOrBuilder getAfterColumnsOrBuilder( + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( int index) { return afterColumns_.get(index); } public static final int PROPS_FIELD_NUMBER = 3; - private java.util.List props_; + @SuppressWarnings("serial") + private java.util.List props_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List getPropsList() { + @java.lang.Override + public java.util.List getPropsList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List + @java.lang.Override + public java.util.List getPropsOrBuilderList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ + @java.lang.Override public int getPropsCount() { return props_.size(); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair getProps(int index) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public PairOrBuilder getPropsOrBuilder( + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } - private void initFields() { - beforeColumns_ = java.util.Collections.emptyList(); - afterColumns_ = java.util.Collections.emptyList(); - props_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -6386,9 +6747,9 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); for (int i = 0; i < beforeColumns_.size(); i++) { output.writeMessage(1, beforeColumns_.get(i)); } @@ -6401,9 +6762,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) getUnknownFields().writeTo(output); } - private int memoizedSerializedSize = -1; + @java.lang.Override public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; @@ -6420,80 +6781,143 @@ public int getSerializedSize() { .computeMessageSize(3, props_.get(i)); } size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; + memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowData)) { + return super.equals(obj); + } + com.alibaba.otter.canal.protocol.CanalEntry.RowData other = (com.alibaba.otter.canal.protocol.CanalEntry.RowData) obj; + + if (!getBeforeColumnsList() + .equals(other.getBeforeColumnsList())) return false; + if (!getAfterColumnsList() + .equals(other.getAfterColumnsList())) return false; + if (!getPropsList() + .equals(other.getPropsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBeforeColumnsCount() > 0) { + hash = (37 * hash) + BEFORECOLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getBeforeColumnsList().hashCode(); + } + if (getAfterColumnsCount() > 0) { + hash = (37 * hash) + AFTERCOLUMNS_FIELD_NUMBER; + hash = (53 * hash) + getAfterColumnsList().hashCode(); + } + if (getPropsCount() > 0) { + hash = (37 * hash) + PROPS_FIELD_NUMBER; + hash = (53 * hash) + getPropsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - public static RowData parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static RowData parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static RowData parseFrom(byte[] data) + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static RowData parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static RowData parseFrom(java.io.InputStream input) + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static RowData parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static RowData parseDelimitedFrom(java.io.InputStream input) + + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); } - public static RowData parseDelimitedFrom( + + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static RowData parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static RowData parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(RowData prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.RowData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -6503,89 +6927,90 @@ protected Builder newBuilderForType( public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.RowData) - RowDataOrBuilder { + com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable .ensureFieldAccessorsInitialized( - RowData.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.RowData.class, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder.class); } // Construct using com.alibaba.otter.canal.protocol.CanalEntry.RowData.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBeforeColumnsFieldBuilder(); - getAfterColumnsFieldBuilder(); - getPropsFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (beforeColumnsBuilder_ == null) { beforeColumns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + beforeColumns_ = null; beforeColumnsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (afterColumnsBuilder_ == null) { afterColumns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + afterColumns_ = null; afterColumnsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + props_ = null; propsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; } - public RowData getDefaultInstanceForType() { - return RowData.getDefaultInstance(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowData getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance(); } - public RowData build() { - RowData result = buildPartial(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowData build() { + com.alibaba.otter.canal.protocol.CanalEntry.RowData result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public RowData buildPartial() { - RowData result = new RowData(this); - int from_bitField0_ = bitField0_; + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowData buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.RowData result = new com.alibaba.otter.canal.protocol.CanalEntry.RowData(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.alibaba.otter.canal.protocol.CanalEntry.RowData result) { if (beforeColumnsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { beforeColumns_ = java.util.Collections.unmodifiableList(beforeColumns_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -6594,7 +7019,7 @@ public RowData buildPartial() { result.beforeColumns_ = beforeColumnsBuilder_.build(); } if (afterColumnsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { afterColumns_ = java.util.Collections.unmodifiableList(afterColumns_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -6603,7 +7028,7 @@ public RowData buildPartial() { result.afterColumns_ = afterColumnsBuilder_.build(); } if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { props_ = java.util.Collections.unmodifiableList(props_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -6611,21 +7036,24 @@ public RowData buildPartial() { } else { result.props_ = propsBuilder_.build(); } - onBuilt(); - return result; } + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalEntry.RowData result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof RowData) { - return mergeFrom((RowData)other); + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowData) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.RowData)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(RowData other) { - if (other == RowData.getDefaultInstance()) return this; + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.RowData other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()) return this; if (beforeColumnsBuilder_ == null) { if (!other.beforeColumns_.isEmpty()) { if (beforeColumns_.isEmpty()) { @@ -6644,7 +7072,7 @@ public Builder mergeFrom(RowData other) { beforeColumnsBuilder_ = null; beforeColumns_ = other.beforeColumns_; bitField0_ = (bitField0_ & ~0x00000001); - beforeColumnsBuilder_ = + beforeColumnsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getBeforeColumnsFieldBuilder() : null; } else { @@ -6670,7 +7098,7 @@ public Builder mergeFrom(RowData other) { afterColumnsBuilder_ = null; afterColumns_ = other.afterColumns_; bitField0_ = (bitField0_ & ~0x00000002); - afterColumnsBuilder_ = + afterColumnsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getAfterColumnsFieldBuilder() : null; } else { @@ -6696,7 +7124,7 @@ public Builder mergeFrom(RowData other) { propsBuilder_ = null; props_ = other.props_; bitField0_ = (bitField0_ & ~0x00000004); - propsBuilder_ = + propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; } else { @@ -6705,52 +7133,107 @@ public Builder mergeFrom(RowData other) { } } this.mergeUnknownFields(other.getUnknownFields()); + 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 { - RowData parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.alibaba.otter.canal.protocol.CanalEntry.Column m = + input.readMessage( + com.alibaba.otter.canal.protocol.CanalEntry.Column.parser(), + extensionRegistry); + if (beforeColumnsBuilder_ == null) { + ensureBeforeColumnsIsMutable(); + beforeColumns_.add(m); + } else { + beforeColumnsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.alibaba.otter.canal.protocol.CanalEntry.Column m = + input.readMessage( + com.alibaba.otter.canal.protocol.CanalEntry.Column.parser(), + extensionRegistry); + if (afterColumnsBuilder_ == null) { + ensureAfterColumnsIsMutable(); + afterColumns_.add(m); + } else { + afterColumnsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + com.alibaba.otter.canal.protocol.CanalEntry.Pair m = + input.readMessage( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.parser(), + extensionRegistry); + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(m); + } else { + propsBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (RowData) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; - private java.util.List beforeColumns_ = + private java.util.List beforeColumns_ = java.util.Collections.emptyList(); private void ensureBeforeColumnsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - beforeColumns_ = new java.util.ArrayList(beforeColumns_); + if (!((bitField0_ & 0x00000001) != 0)) { + beforeColumns_ = new java.util.ArrayList(beforeColumns_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilder< - Column, Column.Builder, ColumnOrBuilder> beforeColumnsBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> beforeColumnsBuilder_; /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public java.util.List getBeforeColumnsList() { + public java.util.List getBeforeColumnsList() { if (beforeColumnsBuilder_ == null) { return java.util.Collections.unmodifiableList(beforeColumns_); } else { @@ -6758,11 +7241,11 @@ public java.util.List getBeforeColumnsList() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ public int getBeforeColumnsCount() { if (beforeColumnsBuilder_ == null) { @@ -6772,13 +7255,13 @@ public int getBeforeColumnsCount() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public Column getBeforeColumns(int index) { + public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { if (beforeColumnsBuilder_ == null) { return beforeColumns_.get(index); } else { @@ -6786,14 +7269,14 @@ public Column getBeforeColumns(int index) { } } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ public Builder setBeforeColumns( - int index, Column value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (beforeColumnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6807,14 +7290,14 @@ public Builder setBeforeColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ public Builder setBeforeColumns( - int index, Column.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (beforeColumnsBuilder_ == null) { ensureBeforeColumnsIsMutable(); beforeColumns_.set(index, builderForValue.build()); @@ -6825,13 +7308,13 @@ public Builder setBeforeColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public Builder addBeforeColumns(Column value) { + public Builder addBeforeColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (beforeColumnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6845,14 +7328,14 @@ public Builder addBeforeColumns(Column value) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ public Builder addBeforeColumns( - int index, Column value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (beforeColumnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6866,14 +7349,14 @@ public Builder addBeforeColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ public Builder addBeforeColumns( - Column.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (beforeColumnsBuilder_ == null) { ensureBeforeColumnsIsMutable(); beforeColumns_.add(builderForValue.build()); @@ -6884,14 +7367,14 @@ public Builder addBeforeColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ public Builder addBeforeColumns( - int index, Column.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (beforeColumnsBuilder_ == null) { ensureBeforeColumnsIsMutable(); beforeColumns_.add(index, builderForValue.build()); @@ -6902,14 +7385,14 @@ public Builder addBeforeColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ public Builder addAllBeforeColumns( - Iterable values) { + java.lang.Iterable values) { if (beforeColumnsBuilder_ == null) { ensureBeforeColumnsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -6921,11 +7404,11 @@ public Builder addAllBeforeColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ public Builder clearBeforeColumns() { if (beforeColumnsBuilder_ == null) { @@ -6938,11 +7421,11 @@ public Builder clearBeforeColumns() { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ public Builder removeBeforeColumns(int index) { if (beforeColumnsBuilder_ == null) { @@ -6955,24 +7438,24 @@ public Builder removeBeforeColumns(int index) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public Column.Builder getBeforeColumnsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder getBeforeColumnsBuilder( int index) { return getBeforeColumnsFieldBuilder().getBuilder(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public ColumnOrBuilder getBeforeColumnsOrBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( int index) { if (beforeColumnsBuilder_ == null) { return beforeColumns_.get(index); } else { @@ -6980,13 +7463,13 @@ public ColumnOrBuilder getBeforeColumnsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public java.util.List + public java.util.List getBeforeColumnsOrBuilderList() { if (beforeColumnsBuilder_ != null) { return beforeColumnsBuilder_.getMessageOrBuilderList(); @@ -6995,47 +7478,47 @@ public ColumnOrBuilder getBeforeColumnsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public Column.Builder addBeforeColumnsBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder() { return getBeforeColumnsFieldBuilder().addBuilder( - Column.getDefaultInstance()); + com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public Column.Builder addBeforeColumnsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder( int index) { return getBeforeColumnsFieldBuilder().addBuilder( - index, Column.getDefaultInstance()); + index, com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * *
-       ** 字段信息,增量数据(修改前,删除前) *
+       * * 字段信息,增量数据(修改前,删除前) *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; */ - public java.util.List + public java.util.List getBeforeColumnsBuilderList() { return getBeforeColumnsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - Column, Column.Builder, ColumnOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> getBeforeColumnsFieldBuilder() { if (beforeColumnsBuilder_ == null) { beforeColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - Column, Column.Builder, ColumnOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder>( beforeColumns_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); beforeColumns_ = null; @@ -7043,26 +7526,26 @@ public Column.Builder addBeforeColumnsBuilder( return beforeColumnsBuilder_; } - private java.util.List afterColumns_ = + private java.util.List afterColumns_ = java.util.Collections.emptyList(); private void ensureAfterColumnsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - afterColumns_ = new java.util.ArrayList(afterColumns_); + if (!((bitField0_ & 0x00000002) != 0)) { + afterColumns_ = new java.util.ArrayList(afterColumns_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< - Column, Column.Builder, ColumnOrBuilder> afterColumnsBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> afterColumnsBuilder_; /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public java.util.List getAfterColumnsList() { + public java.util.List getAfterColumnsList() { if (afterColumnsBuilder_ == null) { return java.util.Collections.unmodifiableList(afterColumns_); } else { @@ -7070,11 +7553,11 @@ public java.util.List getAfterColumnsList() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ public int getAfterColumnsCount() { if (afterColumnsBuilder_ == null) { @@ -7084,13 +7567,13 @@ public int getAfterColumnsCount() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public Column getAfterColumns(int index) { + public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { if (afterColumnsBuilder_ == null) { return afterColumns_.get(index); } else { @@ -7098,14 +7581,14 @@ public Column getAfterColumns(int index) { } } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ public Builder setAfterColumns( - int index, Column value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (afterColumnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -7119,14 +7602,14 @@ public Builder setAfterColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ public Builder setAfterColumns( - int index, Column.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (afterColumnsBuilder_ == null) { ensureAfterColumnsIsMutable(); afterColumns_.set(index, builderForValue.build()); @@ -7137,13 +7620,13 @@ public Builder setAfterColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public Builder addAfterColumns(Column value) { + public Builder addAfterColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (afterColumnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -7157,14 +7640,14 @@ public Builder addAfterColumns(Column value) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ public Builder addAfterColumns( - int index, Column value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (afterColumnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -7178,14 +7661,14 @@ public Builder addAfterColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ public Builder addAfterColumns( - Column.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (afterColumnsBuilder_ == null) { ensureAfterColumnsIsMutable(); afterColumns_.add(builderForValue.build()); @@ -7196,14 +7679,14 @@ public Builder addAfterColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ public Builder addAfterColumns( - int index, Column.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (afterColumnsBuilder_ == null) { ensureAfterColumnsIsMutable(); afterColumns_.add(index, builderForValue.build()); @@ -7214,14 +7697,14 @@ public Builder addAfterColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ public Builder addAllAfterColumns( - Iterable values) { + java.lang.Iterable values) { if (afterColumnsBuilder_ == null) { ensureAfterColumnsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -7233,11 +7716,11 @@ public Builder addAllAfterColumns( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ public Builder clearAfterColumns() { if (afterColumnsBuilder_ == null) { @@ -7250,11 +7733,11 @@ public Builder clearAfterColumns() { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ public Builder removeAfterColumns(int index) { if (afterColumnsBuilder_ == null) { @@ -7267,24 +7750,24 @@ public Builder removeAfterColumns(int index) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public Column.Builder getAfterColumnsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder getAfterColumnsBuilder( int index) { return getAfterColumnsFieldBuilder().getBuilder(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public ColumnOrBuilder getAfterColumnsOrBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( int index) { if (afterColumnsBuilder_ == null) { return afterColumns_.get(index); } else { @@ -7292,13 +7775,13 @@ public ColumnOrBuilder getAfterColumnsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public java.util.List + public java.util.List getAfterColumnsOrBuilderList() { if (afterColumnsBuilder_ != null) { return afterColumnsBuilder_.getMessageOrBuilderList(); @@ -7307,47 +7790,47 @@ public ColumnOrBuilder getAfterColumnsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public Column.Builder addAfterColumnsBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder() { return getAfterColumnsFieldBuilder().addBuilder( - Column.getDefaultInstance()); + com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public Column.Builder addAfterColumnsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder( int index) { return getAfterColumnsFieldBuilder().addBuilder( - index, Column.getDefaultInstance()); + index, com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * *
-       ** 字段信息,增量数据(修改后,新增后)  *
+       * * 字段信息,增量数据(修改后,新增后)  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; */ - public java.util.List + public java.util.List getAfterColumnsBuilderList() { return getAfterColumnsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - Column, Column.Builder, ColumnOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> getAfterColumnsFieldBuilder() { if (afterColumnsBuilder_ == null) { afterColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - Column, Column.Builder, ColumnOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder>( afterColumns_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); afterColumns_ = null; @@ -7355,26 +7838,26 @@ public Column.Builder addAfterColumnsBuilder( return afterColumnsBuilder_; } - private java.util.List props_ = + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(props_); + if (!((bitField0_ & 0x00000004) != 0)) { + props_ = new java.util.ArrayList(props_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> propsBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List getPropsList() { + public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); } else { @@ -7382,11 +7865,11 @@ public java.util.List getPropsList() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public int getPropsCount() { if (propsBuilder_ == null) { @@ -7396,13 +7879,13 @@ public int getPropsCount() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair getProps(int index) { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -7410,14 +7893,14 @@ public Pair getProps(int index) { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder setProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -7431,14 +7914,14 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder setProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.set(index, builderForValue.build()); @@ -7449,13 +7932,13 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Builder addProps(Pair value) { + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -7469,14 +7952,14 @@ public Builder addProps(Pair value) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -7490,14 +7973,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addProps( - Pair.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(builderForValue.build()); @@ -7508,14 +7991,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(index, builderForValue.build()); @@ -7526,14 +8009,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addAllProps( - Iterable values) { + java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -7545,11 +8028,11 @@ public Builder addAllProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder clearProps() { if (propsBuilder_ == null) { @@ -7562,11 +8045,11 @@ public Builder clearProps() { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder removeProps(int index) { if (propsBuilder_ == null) { @@ -7579,24 +8062,24 @@ public Builder removeProps(int index) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair.Builder getPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public PairOrBuilder getPropsOrBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -7604,13 +8087,13 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List + public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { return propsBuilder_.getMessageOrBuilderList(); @@ -7619,47 +8102,47 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair.Builder addPropsBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( - Pair.getDefaultInstance()); + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair.Builder addPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( - index, Pair.getDefaultInstance()); + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List + public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> getPropsFieldBuilder() { if (propsBuilder_ == null) { propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( props_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); props_ = null; @@ -7670,12 +8153,52 @@ public Pair.Builder addPropsBuilder( // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.RowData) } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowData) + private static final com.alibaba.otter.canal.protocol.CanalEntry.RowData DEFAULT_INSTANCE; static { - defaultInstance = new RowData(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalEntry.RowData(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RowData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowData) } public interface RowChangeOrBuilder extends @@ -7683,461 +8206,406 @@ public interface RowChangeOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int64 tableId = 1; - * *
-     **tableId,由数据库产生*
+     * *tableId,由数据库产生*
      * 
- */ - boolean hasTableId(); - /** - * optional int64 tableId = 1; * - *
-     **tableId,由数据库产生*
-     * 
+ * int64 tableId = 1; + * @return The tableId. */ long getTableId(); /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return Whether the eventType field is set. */ boolean hasEventType(); /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return The enum numeric value on the wire for eventType. + */ + int getEventTypeValue(); + /** + * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return The eventType. */ - EventType getEventType(); + com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType(); /** - * optional bool isDdl = 10 [default = false]; - * - *
-     ** 标识是否是ddl语句  *
-     * 
+ * bool isDdl = 10; + * @return Whether the isDdl field is set. */ boolean hasIsDdl(); /** - * optional bool isDdl = 10 [default = false]; - * - *
-     ** 标识是否是ddl语句  *
-     * 
+ * bool isDdl = 10; + * @return The isDdl. */ boolean getIsDdl(); /** - * optional string sql = 11; - * *
-     ** ddl/query的sql语句  *
+     * * ddl/query的sql语句  *
      * 
- */ - boolean hasSql(); - /** - * optional string sql = 11; * - *
-     ** ddl/query的sql语句  *
-     * 
+ * string sql = 11; + * @return The sql. */ - String getSql(); + java.lang.String getSql(); /** - * optional string sql = 11; - * *
-     ** ddl/query的sql语句  *
+     * * ddl/query的sql语句  *
      * 
+ * + * string sql = 11; + * @return The bytes for sql. */ com.google.protobuf.ByteString getSqlBytes(); /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - java.util.List + java.util.List getRowDatasList(); /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - RowData getRowDatas(int index); + com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index); /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ int getRowDatasCount(); /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - java.util.List + java.util.List getRowDatasOrBuilderList(); /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - RowDataOrBuilder getRowDatasOrBuilder(int index); + com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( + int index); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - java.util.List + java.util.List getPropsList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - Pair getProps(int index); + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ int getPropsCount(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - java.util.List + java.util.List getPropsOrBuilderList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - PairOrBuilder getPropsOrBuilder(int index); + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); /** - * optional string ddlSchemaName = 14; - * *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
      * 
- */ - boolean hasDdlSchemaName(); - /** - * optional string ddlSchemaName = 14; * - *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-     * 
+ * string ddlSchemaName = 14; + * @return The ddlSchemaName. */ - String getDdlSchemaName(); + java.lang.String getDdlSchemaName(); /** - * optional string ddlSchemaName = 14; - * *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
      * 
+ * + * string ddlSchemaName = 14; + * @return The bytes for ddlSchemaName. */ com.google.protobuf.ByteString getDdlSchemaNameBytes(); + + com.alibaba.otter.canal.protocol.CanalEntry.RowChange.EventTypePresentCase getEventTypePresentCase(); + + com.alibaba.otter.canal.protocol.CanalEntry.RowChange.IsDdlPresentCase getIsDdlPresentCase(); } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} - * *
-   **message row 每行变更数据的数据结构*
+   * *message row 每行变更数据的数据结构*
    * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} */ public static final class RowChange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowChange) RowChangeOrBuilder { - // Use RowChange.newBuilder() to construct. - private RowChange(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private RowChange(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final RowChange defaultInstance; - public static RowChange getDefaultInstance() { - return defaultInstance; - } - - public RowChange getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RowChange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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 (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - tableId_ = input.readInt64(); - break; - } - case 16: { - int rawValue = input.readEnum(); - EventType value = EventType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - eventType_ = value; - } - break; - } - case 80: { - bitField0_ |= 0x00000004; - isDdl_ = input.readBool(); - break; - } - case 90: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000008; - sql_ = bs; - break; - } - case 98: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - rowDatas_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - rowDatas_.add(input.readMessage(RowData.PARSER, extensionRegistry)); - break; - } - case 106: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - props_.add(input.readMessage(Pair.PARSER, extensionRegistry)); - break; - } - case 114: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000010; - ddlSchemaName_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - rowDatas_ = java.util.Collections.unmodifiableList(rowDatas_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + RowChange.class.getName()); } + // Use RowChange.newBuilder() to construct. + private RowChange(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private RowChange() { + sql_ = ""; + rowDatas_ = java.util.Collections.emptyList(); + props_ = java.util.Collections.emptyList(); + ddlSchemaName_ = ""; + } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable .ensureFieldAccessorsInitialized( - RowChange.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.RowChange.class, com.alibaba.otter.canal.protocol.CanalEntry.RowChange.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public RowChange parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RowChange(input, extensionRegistry); + private int eventTypePresentCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object eventTypePresent_; + public enum EventTypePresentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EVENTTYPE(2), + EVENTTYPEPRESENT_NOT_SET(0); + private final int value; + private EventTypePresentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventTypePresentCase valueOf(int value) { + return forNumber(value); + } + + public static EventTypePresentCase forNumber(int value) { + switch (value) { + case 2: return EVENTTYPE; + case 0: return EVENTTYPEPRESENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; } }; - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public EventTypePresentCase + getEventTypePresentCase() { + return EventTypePresentCase.forNumber( + eventTypePresentCase_); + } + + private int isDdlPresentCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object isDdlPresent_; + public enum IsDdlPresentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ISDDL(10), + ISDDLPRESENT_NOT_SET(0); + private final int value; + private IsDdlPresentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IsDdlPresentCase valueOf(int value) { + return forNumber(value); + } + + public static IsDdlPresentCase forNumber(int value) { + switch (value) { + case 10: return ISDDL; + case 0: return ISDDLPRESENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public IsDdlPresentCase + getIsDdlPresentCase() { + return IsDdlPresentCase.forNumber( + isDdlPresentCase_); } - private int bitField0_; public static final int TABLEID_FIELD_NUMBER = 1; - private long tableId_; + private long tableId_ = 0L; /** - * optional int64 tableId = 1; - * *
-     **tableId,由数据库产生*
+     * *tableId,由数据库产生*
      * 
- */ - public boolean hasTableId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int64 tableId = 1; * - *
-     **tableId,由数据库产生*
-     * 
+ * int64 tableId = 1; + * @return The tableId. */ + @java.lang.Override public long getTableId() { return tableId_; } public static final int EVENTTYPE_FIELD_NUMBER = 2; - private EventType eventType_; /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return Whether the eventType field is set. */ public boolean hasEventType() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return eventTypePresentCase_ == 2; } /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return The enum numeric value on the wire for eventType. */ - public EventType getEventType() { - return eventType_; + public int getEventTypeValue() { + if (eventTypePresentCase_ == 2) { + return (java.lang.Integer) eventTypePresent_; + } + return 0; + } + /** + * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return The eventType. + */ + public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { + if (eventTypePresentCase_ == 2) { + com.alibaba.otter.canal.protocol.CanalEntry.EventType result = com.alibaba.otter.canal.protocol.CanalEntry.EventType.forNumber( + (java.lang.Integer) eventTypePresent_); + return result == null ? com.alibaba.otter.canal.protocol.CanalEntry.EventType.UNRECOGNIZED : result; + } + return com.alibaba.otter.canal.protocol.CanalEntry.EventType.EVENTTYPECOMPATIBLEPROTO2; } public static final int ISDDL_FIELD_NUMBER = 10; - private boolean isDdl_; /** - * optional bool isDdl = 10 [default = false]; - * - *
-     ** 标识是否是ddl语句  *
-     * 
+ * bool isDdl = 10; + * @return Whether the isDdl field is set. */ + @java.lang.Override public boolean hasIsDdl() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return isDdlPresentCase_ == 10; } /** - * optional bool isDdl = 10 [default = false]; - * - *
-     ** 标识是否是ddl语句  *
-     * 
+ * bool isDdl = 10; + * @return The isDdl. */ + @java.lang.Override public boolean getIsDdl() { - return isDdl_; + if (isDdlPresentCase_ == 10) { + return (java.lang.Boolean) isDdlPresent_; + } + return false; } public static final int SQL_FIELD_NUMBER = 11; - private Object sql_; + @SuppressWarnings("serial") + private volatile java.lang.Object sql_ = ""; /** - * optional string sql = 11; - * *
-     ** ddl/query的sql语句  *
+     * * ddl/query的sql语句  *
      * 
- */ - public boolean hasSql() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional string sql = 11; * - *
-     ** ddl/query的sql语句  *
-     * 
+ * string sql = 11; + * @return The sql. */ - public String getSql() { - Object ref = sql_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getSql() { + java.lang.Object ref = sql_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - sql_ = s; - } + java.lang.String s = bs.toStringUtf8(); + sql_ = s; return s; } } /** - * optional string sql = 11; - * *
-     ** ddl/query的sql语句  *
+     * * ddl/query的sql语句  *
      * 
+ * + * string sql = 11; + * @return The bytes for sql. */ + @java.lang.Override public com.google.protobuf.ByteString getSqlBytes() { - Object ref = sql_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = sql_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); sql_ = b; return b; } else { @@ -8146,162 +8614,167 @@ public String getSql() { } public static final int ROWDATAS_FIELD_NUMBER = 12; - private java.util.List rowDatas_; + @SuppressWarnings("serial") + private java.util.List rowDatas_; /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public java.util.List getRowDatasList() { + @java.lang.Override + public java.util.List getRowDatasList() { return rowDatas_; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public java.util.List + @java.lang.Override + public java.util.List getRowDatasOrBuilderList() { return rowDatas_; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ + @java.lang.Override public int getRowDatasCount() { return rowDatas_.size(); } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public RowData getRowDatas(int index) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { return rowDatas_.get(index); } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-     ** 一次数据库变更可能存在多行  *
+     * * 一次数据库变更可能存在多行  *
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public RowDataOrBuilder getRowDatasOrBuilder( + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( int index) { return rowDatas_.get(index); } public static final int PROPS_FIELD_NUMBER = 13; - private java.util.List props_; + @SuppressWarnings("serial") + private java.util.List props_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public java.util.List getPropsList() { + @java.lang.Override + public java.util.List getPropsList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public java.util.List + @java.lang.Override + public java.util.List getPropsOrBuilderList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ + @java.lang.Override public int getPropsCount() { return props_.size(); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public Pair getProps(int index) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public PairOrBuilder getPropsOrBuilder( + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } public static final int DDLSCHEMANAME_FIELD_NUMBER = 14; - private Object ddlSchemaName_; + @SuppressWarnings("serial") + private volatile java.lang.Object ddlSchemaName_ = ""; /** - * optional string ddlSchemaName = 14; - * *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
      * 
- */ - public boolean hasDdlSchemaName() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional string ddlSchemaName = 14; * - *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-     * 
+ * string ddlSchemaName = 14; + * @return The ddlSchemaName. */ - public String getDdlSchemaName() { - Object ref = ddlSchemaName_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getDdlSchemaName() { + java.lang.Object ref = ddlSchemaName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ddlSchemaName_ = s; - } + java.lang.String s = bs.toStringUtf8(); + ddlSchemaName_ = s; return s; } } /** - * optional string ddlSchemaName = 14; - * *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
      * 
+ * + * string ddlSchemaName = 14; + * @return The bytes for ddlSchemaName. */ + @java.lang.Override public com.google.protobuf.ByteString getDdlSchemaNameBytes() { - Object ref = ddlSchemaName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = ddlSchemaName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); ddlSchemaName_ = b; return b; } else { @@ -8309,16 +8782,8 @@ public String getDdlSchemaName() { } } - private void initFields() { - tableId_ = 0L; - eventType_ = EventType.UPDATE; - isDdl_ = false; - sql_ = ""; - rowDatas_ = java.util.Collections.emptyList(); - props_ = java.util.Collections.emptyList(); - ddlSchemaName_ = ""; - } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -8328,20 +8793,21 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (tableId_ != 0L) { output.writeInt64(1, tableId_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, eventType_.getNumber()); + if (eventTypePresentCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) eventTypePresent_)); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBool(10, isDdl_); + if (isDdlPresentCase_ == 10) { + output.writeBool( + 10, (boolean)((java.lang.Boolean) isDdlPresent_)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(11, getSqlBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, sql_); } for (int i = 0; i < rowDatas_.size(); i++) { output.writeMessage(12, rowDatas_.get(i)); @@ -8349,33 +8815,33 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < props_.size(); i++) { output.writeMessage(13, props_.get(i)); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(14, getDdlSchemaNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ddlSchemaName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, ddlSchemaName_); } getUnknownFields().writeTo(output); } - private int memoizedSerializedSize = -1; + @java.lang.Override public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (tableId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, tableId_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (eventTypePresentCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, eventType_.getNumber()); + .computeEnumSize(2, ((java.lang.Integer) eventTypePresent_)); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (isDdlPresentCase_ == 10) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(10, isDdl_); + .computeBoolSize( + 10, (boolean)((java.lang.Boolean) isDdlPresent_)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(11, getSqlBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sql_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, sql_); } for (int i = 0; i < rowDatas_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -8385,201 +8851,287 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(13, props_.get(i)); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(14, getDdlSchemaNameBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ddlSchemaName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, ddlSchemaName_); } size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; + memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowChange)) { + return super.equals(obj); + } + com.alibaba.otter.canal.protocol.CanalEntry.RowChange other = (com.alibaba.otter.canal.protocol.CanalEntry.RowChange) obj; + + if (getTableId() + != other.getTableId()) return false; + if (!getSql() + .equals(other.getSql())) return false; + if (!getRowDatasList() + .equals(other.getRowDatasList())) return false; + if (!getPropsList() + .equals(other.getPropsList())) return false; + if (!getDdlSchemaName() + .equals(other.getDdlSchemaName())) return false; + if (!getEventTypePresentCase().equals(other.getEventTypePresentCase())) return false; + switch (eventTypePresentCase_) { + case 2: + if (getEventTypeValue() + != other.getEventTypeValue()) return false; + break; + case 0: + default: + } + if (!getIsDdlPresentCase().equals(other.getIsDdlPresentCase())) return false; + switch (isDdlPresentCase_) { + case 10: + if (getIsDdl() + != other.getIsDdl()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - public static RowChange parseFrom( + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TABLEID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTableId()); + hash = (37 * hash) + SQL_FIELD_NUMBER; + hash = (53 * hash) + getSql().hashCode(); + if (getRowDatasCount() > 0) { + hash = (37 * hash) + ROWDATAS_FIELD_NUMBER; + hash = (53 * hash) + getRowDatasList().hashCode(); + } + if (getPropsCount() > 0) { + hash = (37 * hash) + PROPS_FIELD_NUMBER; + hash = (53 * hash) + getPropsList().hashCode(); + } + hash = (37 * hash) + DDLSCHEMANAME_FIELD_NUMBER; + hash = (53 * hash) + getDdlSchemaName().hashCode(); + switch (eventTypePresentCase_) { + case 2: + hash = (37 * hash) + EVENTTYPE_FIELD_NUMBER; + hash = (53 * hash) + getEventTypeValue(); + break; + case 0: + default: + } + switch (isDdlPresentCase_) { + case 10: + hash = (37 * hash) + ISDDL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsDdl()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static RowChange parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static RowChange parseFrom(byte[] data) + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static RowChange parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static RowChange parseFrom(java.io.InputStream input) + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static RowChange parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static RowChange parseDelimitedFrom(java.io.InputStream input) + + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); } - public static RowChange parseDelimitedFrom( + + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static RowChange parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static RowChange parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(RowChange prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.RowChange prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} - * *
-     **message row 每行变更数据的数据结构*
+     * *message row 每行变更数据的数据结构*
      * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.RowChange) - RowChangeOrBuilder { + com.alibaba.otter.canal.protocol.CanalEntry.RowChangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable .ensureFieldAccessorsInitialized( - RowChange.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.RowChange.class, com.alibaba.otter.canal.protocol.CanalEntry.RowChange.Builder.class); } // Construct using com.alibaba.otter.canal.protocol.CanalEntry.RowChange.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRowDatasFieldBuilder(); - getPropsFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; tableId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - eventType_ = EventType.UPDATE; - bitField0_ = (bitField0_ & ~0x00000002); - isDdl_ = false; - bitField0_ = (bitField0_ & ~0x00000004); sql_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); if (rowDatasBuilder_ == null) { rowDatas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + rowDatas_ = null; rowDatasBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); } else { + props_ = null; propsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000020); ddlSchemaName_ = ""; - bitField0_ = (bitField0_ & ~0x00000040); + eventTypePresentCase_ = 0; + eventTypePresent_ = null; + isDdlPresentCase_ = 0; + isDdlPresent_ = null; return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; } - public RowChange getDefaultInstanceForType() { - return RowChange.getDefaultInstance(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowChange getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.RowChange.getDefaultInstance(); } - public RowChange build() { - RowChange result = buildPartial(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowChange build() { + com.alibaba.otter.canal.protocol.CanalEntry.RowChange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public RowChange buildPartial() { - RowChange result = new RowChange(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableId_ = tableId_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.eventType_ = eventType_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.isDdl_ = isDdl_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.sql_ = sql_; + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowChange buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.RowChange result = new com.alibaba.otter.canal.protocol.CanalEntry.RowChange(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.alibaba.otter.canal.protocol.CanalEntry.RowChange result) { if (rowDatasBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { rowDatas_ = java.util.Collections.unmodifiableList(rowDatas_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -8588,7 +9140,7 @@ public RowChange buildPartial() { result.rowDatas_ = rowDatasBuilder_.build(); } if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000020) != 0)) { props_ = java.util.Collections.unmodifiableList(props_); bitField0_ = (bitField0_ & ~0x00000020); } @@ -8596,38 +9148,46 @@ public RowChange buildPartial() { } else { result.props_ = propsBuilder_.build(); } - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000010; + } + + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalEntry.RowChange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tableId_ = tableId_; } - result.ddlSchemaName_ = ddlSchemaName_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sql_ = sql_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.ddlSchemaName_ = ddlSchemaName_; + } + } + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalEntry.RowChange result) { + result.eventTypePresentCase_ = eventTypePresentCase_; + result.eventTypePresent_ = this.eventTypePresent_; + result.isDdlPresentCase_ = isDdlPresentCase_; + result.isDdlPresent_ = this.isDdlPresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof RowChange) { - return mergeFrom((RowChange)other); + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowChange) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.RowChange)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(RowChange other) { - if (other == RowChange.getDefaultInstance()) return this; - if (other.hasTableId()) { + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.RowChange other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.RowChange.getDefaultInstance()) return this; + if (other.getTableId() != 0L) { setTableId(other.getTableId()); } - if (other.hasEventType()) { - setEventType(other.getEventType()); - } - if (other.hasIsDdl()) { - setIsDdl(other.getIsDdl()); - } - if (other.hasSql()) { - bitField0_ |= 0x00000008; + if (!other.getSql().isEmpty()) { sql_ = other.sql_; + bitField0_ |= 0x00000008; onChanged(); } if (rowDatasBuilder_ == null) { @@ -8648,7 +9208,7 @@ public Builder mergeFrom(RowChange other) { rowDatasBuilder_ = null; rowDatas_ = other.rowDatas_; bitField0_ = (bitField0_ & ~0x00000010); - rowDatasBuilder_ = + rowDatasBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRowDatasFieldBuilder() : null; } else { @@ -8674,7 +9234,7 @@ public Builder mergeFrom(RowChange other) { propsBuilder_ = null; props_ = other.props_; bitField0_ = (bitField0_ & ~0x00000020); - propsBuilder_ = + propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; } else { @@ -8682,78 +9242,190 @@ public Builder mergeFrom(RowChange other) { } } } - if (other.hasDdlSchemaName()) { - bitField0_ |= 0x00000040; + if (!other.getDdlSchemaName().isEmpty()) { ddlSchemaName_ = other.ddlSchemaName_; + bitField0_ |= 0x00000040; onChanged(); } + switch (other.getEventTypePresentCase()) { + case EVENTTYPE: { + setEventTypeValue(other.getEventTypeValue()); + break; + } + case EVENTTYPEPRESENT_NOT_SET: { + break; + } + } + switch (other.getIsDdlPresentCase()) { + case ISDDL: { + setIsDdl(other.getIsDdl()); + break; + } + case ISDDLPRESENT_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); + 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 { - RowChange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + tableId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + int rawValue = input.readEnum(); + eventTypePresentCase_ = 2; + eventTypePresent_ = rawValue; + break; + } // case 16 + case 80: { + isDdlPresent_ = input.readBool(); + isDdlPresentCase_ = 10; + break; + } // case 80 + case 90: { + sql_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 90 + case 98: { + com.alibaba.otter.canal.protocol.CanalEntry.RowData m = + input.readMessage( + com.alibaba.otter.canal.protocol.CanalEntry.RowData.parser(), + extensionRegistry); + if (rowDatasBuilder_ == null) { + ensureRowDatasIsMutable(); + rowDatas_.add(m); + } else { + rowDatasBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + com.alibaba.otter.canal.protocol.CanalEntry.Pair m = + input.readMessage( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.parser(), + extensionRegistry); + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(m); + } else { + propsBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: { + ddlSchemaName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 114 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (RowChange) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally + return this; + } + private int eventTypePresentCase_ = 0; + private java.lang.Object eventTypePresent_; + public EventTypePresentCase + getEventTypePresentCase() { + return EventTypePresentCase.forNumber( + eventTypePresentCase_); + } + + public Builder clearEventTypePresent() { + eventTypePresentCase_ = 0; + eventTypePresent_ = null; + onChanged(); + return this; + } + + private int isDdlPresentCase_ = 0; + private java.lang.Object isDdlPresent_; + public IsDdlPresentCase + getIsDdlPresentCase() { + return IsDdlPresentCase.forNumber( + isDdlPresentCase_); + } + + public Builder clearIsDdlPresent() { + isDdlPresentCase_ = 0; + isDdlPresent_ = null; + onChanged(); return this; } + private int bitField0_; private long tableId_ ; /** - * optional int64 tableId = 1; - * *
-       **tableId,由数据库产生*
+       * *tableId,由数据库产生*
        * 
- */ - public boolean hasTableId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int64 tableId = 1; * - *
-       **tableId,由数据库产生*
-       * 
+ * int64 tableId = 1; + * @return The tableId. */ + @java.lang.Override public long getTableId() { return tableId_; } /** - * optional int64 tableId = 1; - * *
-       **tableId,由数据库产生*
+       * *tableId,由数据库产生*
        * 
+ * + * int64 tableId = 1; + * @param value The tableId to set. + * @return This builder for chaining. */ public Builder setTableId(long value) { - bitField0_ |= 0x00000001; + tableId_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional int64 tableId = 1; - * *
-       **tableId,由数据库产生*
+       * *tableId,由数据库产生*
        * 
+ * + * int64 tableId = 1; + * @return This builder for chaining. */ public Builder clearTableId() { bitField0_ = (bitField0_ & ~0x00000001); @@ -8762,151 +9434,154 @@ public Builder clearTableId() { return this; } - private EventType eventType_ = EventType.UPDATE; /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return Whether the eventType field is set. */ + @java.lang.Override public boolean hasEventType() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return eventTypePresentCase_ == 2; } /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return The enum numeric value on the wire for eventType. */ - public EventType getEventType() { - return eventType_; + @java.lang.Override + public int getEventTypeValue() { + if (eventTypePresentCase_ == 2) { + return ((java.lang.Integer) eventTypePresent_).intValue(); + } + return 0; } /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @param value The enum numeric value on the wire for eventType to set. + * @return This builder for chaining. + */ + public Builder setEventTypeValue(int value) { + eventTypePresentCase_ = 2; + eventTypePresent_ = value; + onChanged(); + return this; + } + /** + * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return The eventType. + */ + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { + if (eventTypePresentCase_ == 2) { + com.alibaba.otter.canal.protocol.CanalEntry.EventType result = com.alibaba.otter.canal.protocol.CanalEntry.EventType.forNumber( + (java.lang.Integer) eventTypePresent_); + return result == null ? com.alibaba.otter.canal.protocol.CanalEntry.EventType.UNRECOGNIZED : result; + } + return com.alibaba.otter.canal.protocol.CanalEntry.EventType.EVENTTYPECOMPATIBLEPROTO2; + } + /** + * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @param value The eventType to set. + * @return This builder for chaining. */ - public Builder setEventType(EventType value) { + public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - eventType_ = value; + eventTypePresentCase_ = 2; + eventTypePresent_ = value.getNumber(); onChanged(); return this; } /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
+ * .com.alibaba.otter.canal.protocol.EventType eventType = 2; + * @return This builder for chaining. */ public Builder clearEventType() { - bitField0_ = (bitField0_ & ~0x00000002); - eventType_ = EventType.UPDATE; - onChanged(); + if (eventTypePresentCase_ == 2) { + eventTypePresentCase_ = 0; + eventTypePresent_ = null; + onChanged(); + } return this; } - private boolean isDdl_ ; /** - * optional bool isDdl = 10 [default = false]; - * - *
-       ** 标识是否是ddl语句  *
-       * 
+ * bool isDdl = 10; + * @return Whether the isDdl field is set. */ public boolean hasIsDdl() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return isDdlPresentCase_ == 10; } /** - * optional bool isDdl = 10 [default = false]; - * - *
-       ** 标识是否是ddl语句  *
-       * 
+ * bool isDdl = 10; + * @return The isDdl. */ public boolean getIsDdl() { - return isDdl_; + if (isDdlPresentCase_ == 10) { + return (java.lang.Boolean) isDdlPresent_; + } + return false; } /** - * optional bool isDdl = 10 [default = false]; - * - *
-       ** 标识是否是ddl语句  *
-       * 
+ * bool isDdl = 10; + * @param value The isDdl to set. + * @return This builder for chaining. */ public Builder setIsDdl(boolean value) { - bitField0_ |= 0x00000004; - isDdl_ = value; + + isDdlPresentCase_ = 10; + isDdlPresent_ = value; onChanged(); return this; } /** - * optional bool isDdl = 10 [default = false]; - * - *
-       ** 标识是否是ddl语句  *
-       * 
+ * bool isDdl = 10; + * @return This builder for chaining. */ public Builder clearIsDdl() { - bitField0_ = (bitField0_ & ~0x00000004); - isDdl_ = false; - onChanged(); + if (isDdlPresentCase_ == 10) { + isDdlPresentCase_ = 0; + isDdlPresent_ = null; + onChanged(); + } return this; } - private Object sql_ = ""; + private java.lang.Object sql_ = ""; /** - * optional string sql = 11; - * *
-       ** ddl/query的sql语句  *
+       * * ddl/query的sql语句  *
        * 
- */ - public boolean hasSql() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional string sql = 11; * - *
-       ** ddl/query的sql语句  *
-       * 
+ * string sql = 11; + * @return The sql. */ - public String getSql() { - Object ref = sql_; - if (!(ref instanceof String)) { + public java.lang.String getSql() { + java.lang.Object ref = sql_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - sql_ = s; - } + java.lang.String s = bs.toStringUtf8(); + sql_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string sql = 11; - * *
-       ** ddl/query的sql语句  *
+       * * ddl/query的sql语句  *
        * 
+ * + * string sql = 11; + * @return The bytes for sql. */ public com.google.protobuf.ByteString getSqlBytes() { - Object ref = sql_; + java.lang.Object ref = sql_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); sql_ = b; return b; } else { @@ -8914,73 +9589,75 @@ public String getSql() { } } /** - * optional string sql = 11; - * *
-       ** ddl/query的sql语句  *
+       * * ddl/query的sql语句  *
        * 
+ * + * string sql = 11; + * @param value The sql to set. + * @return This builder for chaining. */ public Builder setSql( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } sql_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** - * optional string sql = 11; - * *
-       ** ddl/query的sql语句  *
+       * * ddl/query的sql语句  *
        * 
+ * + * string sql = 11; + * @return This builder for chaining. */ public Builder clearSql() { - bitField0_ = (bitField0_ & ~0x00000008); sql_ = getDefaultInstance().getSql(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** - * optional string sql = 11; - * *
-       ** ddl/query的sql语句  *
+       * * ddl/query的sql语句  *
        * 
+ * + * string sql = 11; + * @param value The bytes for sql to set. + * @return This builder for chaining. */ public Builder setSqlBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); sql_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } - private java.util.List rowDatas_ = + private java.util.List rowDatas_ = java.util.Collections.emptyList(); private void ensureRowDatasIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - rowDatas_ = new java.util.ArrayList(rowDatas_); + if (!((bitField0_ & 0x00000010) != 0)) { + rowDatas_ = new java.util.ArrayList(rowDatas_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilder< - RowData, RowData.Builder, RowDataOrBuilder> rowDatasBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.RowData, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder, com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder> rowDatasBuilder_; /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public java.util.List getRowDatasList() { + public java.util.List getRowDatasList() { if (rowDatasBuilder_ == null) { return java.util.Collections.unmodifiableList(rowDatas_); } else { @@ -8988,11 +9665,11 @@ public java.util.List getRowDatasList() { } } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ public int getRowDatasCount() { if (rowDatasBuilder_ == null) { @@ -9002,13 +9679,13 @@ public int getRowDatasCount() { } } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public RowData getRowDatas(int index) { + public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { if (rowDatasBuilder_ == null) { return rowDatas_.get(index); } else { @@ -9016,14 +9693,14 @@ public RowData getRowDatas(int index) { } } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ public Builder setRowDatas( - int index, RowData value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { if (rowDatasBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -9037,14 +9714,14 @@ public Builder setRowDatas( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ public Builder setRowDatas( - int index, RowData.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { if (rowDatasBuilder_ == null) { ensureRowDatasIsMutable(); rowDatas_.set(index, builderForValue.build()); @@ -9055,13 +9732,13 @@ public Builder setRowDatas( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public Builder addRowDatas(RowData value) { + public Builder addRowDatas(com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { if (rowDatasBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -9075,14 +9752,14 @@ public Builder addRowDatas(RowData value) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ public Builder addRowDatas( - int index, RowData value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { if (rowDatasBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -9096,14 +9773,14 @@ public Builder addRowDatas( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ public Builder addRowDatas( - RowData.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { if (rowDatasBuilder_ == null) { ensureRowDatasIsMutable(); rowDatas_.add(builderForValue.build()); @@ -9114,14 +9791,14 @@ public Builder addRowDatas( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ public Builder addRowDatas( - int index, RowData.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { if (rowDatasBuilder_ == null) { ensureRowDatasIsMutable(); rowDatas_.add(index, builderForValue.build()); @@ -9132,14 +9809,14 @@ public Builder addRowDatas( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ public Builder addAllRowDatas( - Iterable values) { + java.lang.Iterable values) { if (rowDatasBuilder_ == null) { ensureRowDatasIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -9151,11 +9828,11 @@ public Builder addAllRowDatas( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ public Builder clearRowDatas() { if (rowDatasBuilder_ == null) { @@ -9168,11 +9845,11 @@ public Builder clearRowDatas() { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ public Builder removeRowDatas(int index) { if (rowDatasBuilder_ == null) { @@ -9185,24 +9862,24 @@ public Builder removeRowDatas(int index) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public RowData.Builder getRowDatasBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder getRowDatasBuilder( int index) { return getRowDatasFieldBuilder().getBuilder(index); } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public RowDataOrBuilder getRowDatasOrBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( int index) { if (rowDatasBuilder_ == null) { return rowDatas_.get(index); } else { @@ -9210,13 +9887,13 @@ public RowDataOrBuilder getRowDatasOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public java.util.List + public java.util.List getRowDatasOrBuilderList() { if (rowDatasBuilder_ != null) { return rowDatasBuilder_.getMessageOrBuilderList(); @@ -9225,47 +9902,47 @@ public RowDataOrBuilder getRowDatasOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public RowData.Builder addRowDatasBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder() { return getRowDatasFieldBuilder().addBuilder( - RowData.getDefaultInstance()); + com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public RowData.Builder addRowDatasBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder( int index) { return getRowDatasFieldBuilder().addBuilder( - index, RowData.getDefaultInstance()); + index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * *
-       ** 一次数据库变更可能存在多行  *
+       * * 一次数据库变更可能存在多行  *
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; */ - public java.util.List + public java.util.List getRowDatasBuilderList() { return getRowDatasFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - RowData, RowData.Builder, RowDataOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.RowData, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder, com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder> getRowDatasFieldBuilder() { if (rowDatasBuilder_ == null) { rowDatasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - RowData, RowData.Builder, RowDataOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.RowData, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder, com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder>( rowDatas_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); rowDatas_ = null; @@ -9273,26 +9950,26 @@ public RowData.Builder addRowDatasBuilder( return rowDatasBuilder_; } - private java.util.List props_ = + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - props_ = new java.util.ArrayList(props_); + if (!((bitField0_ & 0x00000020) != 0)) { + props_ = new java.util.ArrayList(props_); bitField0_ |= 0x00000020; } } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> propsBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public java.util.List getPropsList() { + public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); } else { @@ -9300,11 +9977,11 @@ public java.util.List getPropsList() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ public int getPropsCount() { if (propsBuilder_ == null) { @@ -9314,13 +9991,13 @@ public int getPropsCount() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public Pair getProps(int index) { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -9328,14 +10005,14 @@ public Pair getProps(int index) { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ public Builder setProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -9349,14 +10026,14 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ public Builder setProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.set(index, builderForValue.build()); @@ -9367,13 +10044,13 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public Builder addProps(Pair value) { + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -9387,14 +10064,14 @@ public Builder addProps(Pair value) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ public Builder addProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -9408,14 +10085,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ public Builder addProps( - Pair.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(builderForValue.build()); @@ -9426,14 +10103,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ public Builder addProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(index, builderForValue.build()); @@ -9444,14 +10121,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ public Builder addAllProps( - Iterable values) { + java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -9463,11 +10140,11 @@ public Builder addAllProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ public Builder clearProps() { if (propsBuilder_ == null) { @@ -9480,11 +10157,11 @@ public Builder clearProps() { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ public Builder removeProps(int index) { if (propsBuilder_ == null) { @@ -9497,24 +10174,24 @@ public Builder removeProps(int index) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public Pair.Builder getPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public PairOrBuilder getPropsOrBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -9522,13 +10199,13 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public java.util.List + public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { return propsBuilder_.getMessageOrBuilderList(); @@ -9537,47 +10214,47 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public Pair.Builder addPropsBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( - Pair.getDefaultInstance()); + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public Pair.Builder addPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( - index, Pair.getDefaultInstance()); + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; */ - public java.util.List + public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> getPropsFieldBuilder() { if (propsBuilder_ == null) { propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( props_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); props_ = null; @@ -9585,52 +10262,42 @@ public Pair.Builder addPropsBuilder( return propsBuilder_; } - private Object ddlSchemaName_ = ""; + private java.lang.Object ddlSchemaName_ = ""; /** - * optional string ddlSchemaName = 14; - * *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
        * 
- */ - public boolean hasDdlSchemaName() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional string ddlSchemaName = 14; * - *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-       * 
+ * string ddlSchemaName = 14; + * @return The ddlSchemaName. */ - public String getDdlSchemaName() { - Object ref = ddlSchemaName_; - if (!(ref instanceof String)) { + public java.lang.String getDdlSchemaName() { + java.lang.Object ref = ddlSchemaName_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ddlSchemaName_ = s; - } + java.lang.String s = bs.toStringUtf8(); + ddlSchemaName_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string ddlSchemaName = 14; - * *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
        * 
+ * + * string ddlSchemaName = 14; + * @return The bytes for ddlSchemaName. */ public com.google.protobuf.ByteString getDdlSchemaNameBytes() { - Object ref = ddlSchemaName_; + java.lang.Object ref = ddlSchemaName_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); ddlSchemaName_ = b; return b; } else { @@ -9638,49 +10305,51 @@ public String getDdlSchemaName() { } } /** - * optional string ddlSchemaName = 14; - * *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
        * 
+ * + * string ddlSchemaName = 14; + * @param value The ddlSchemaName to set. + * @return This builder for chaining. */ public Builder setDdlSchemaName( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } ddlSchemaName_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } /** - * optional string ddlSchemaName = 14; - * *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
        * 
+ * + * string ddlSchemaName = 14; + * @return This builder for chaining. */ public Builder clearDdlSchemaName() { - bitField0_ = (bitField0_ & ~0x00000040); ddlSchemaName_ = getDefaultInstance().getDdlSchemaName(); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** - * optional string ddlSchemaName = 14; - * *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
        * 
+ * + * string ddlSchemaName = 14; + * @param value The bytes for ddlSchemaName to set. + * @return This builder for chaining. */ public Builder setDdlSchemaNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ddlSchemaName_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -9688,12 +10357,52 @@ public Builder setDdlSchemaNameBytes( // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.RowChange) } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowChange) + private static final com.alibaba.otter.canal.protocol.CanalEntry.RowChange DEFAULT_INSTANCE; static { - defaultInstance = new RowChange(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalEntry.RowChange(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RowChange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.RowChange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowChange) } public interface TransactionBeginOrBuilder extends @@ -9701,301 +10410,187 @@ public interface TransactionBeginOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int64 executeTime = 1; - * *
-     **已废弃,请使用header里的executeTime*
+     * *已废弃,请使用header里的executeTime*
      * 
- */ - boolean hasExecuteTime(); - /** - * optional int64 executeTime = 1; * - *
-     **已废弃,请使用header里的executeTime*
-     * 
+ * int64 executeTime = 1; + * @return The executeTime. */ long getExecuteTime(); /** - * optional string transactionId = 2; - * *
-     **已废弃,Begin里不提供事务id*
+     * *已废弃,Begin里不提供事务id*
      * 
- */ - boolean hasTransactionId(); - /** - * optional string transactionId = 2; * - *
-     **已废弃,Begin里不提供事务id*
-     * 
+ * string transactionId = 2; + * @return The transactionId. */ - String getTransactionId(); + java.lang.String getTransactionId(); /** - * optional string transactionId = 2; - * *
-     **已废弃,Begin里不提供事务id*
+     * *已废弃,Begin里不提供事务id*
      * 
+ * + * string transactionId = 2; + * @return The bytes for transactionId. */ com.google.protobuf.ByteString getTransactionIdBytes(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - java.util.List + java.util.List getPropsList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - Pair getProps(int index); + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ int getPropsCount(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - java.util.List + java.util.List getPropsOrBuilderList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - PairOrBuilder getPropsOrBuilder(int index); + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); /** - * optional int64 threadId = 4; - * *
-     **执行的thread Id*
+     * *执行的thread Id*
      * 
- */ - boolean hasThreadId(); - /** - * optional int64 threadId = 4; * - *
-     **执行的thread Id*
-     * 
+ * int64 threadId = 4; + * @return The threadId. */ long getThreadId(); } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} - * *
-   **开始事务的一些信息*
+   * *开始事务的一些信息*
    * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} */ public static final class TransactionBegin extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionBegin) TransactionBeginOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + TransactionBegin.class.getName()); + } // Use TransactionBegin.newBuilder() to construct. private TransactionBegin(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private TransactionBegin(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TransactionBegin defaultInstance; - public static TransactionBegin getDefaultInstance() { - return defaultInstance; } - - public TransactionBegin getDefaultInstanceForType() { - return defaultInstance; + private TransactionBegin() { + transactionId_ = ""; + props_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TransactionBegin( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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 (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - executeTime_ = input.readInt64(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - transactionId_ = bs; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - props_.add(input.readMessage(Pair.PARSER, extensionRegistry)); - break; - } - case 32: { - bitField0_ |= 0x00000004; - threadId_ = input.readInt64(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable .ensureFieldAccessorsInitialized( - TransactionBegin.class, Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TransactionBegin parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransactionBegin(input, extensionRegistry); - } - }; - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.Builder.class); } - private int bitField0_; public static final int EXECUTETIME_FIELD_NUMBER = 1; - private long executeTime_; + private long executeTime_ = 0L; /** - * optional int64 executeTime = 1; - * *
-     **已废弃,请使用header里的executeTime*
+     * *已废弃,请使用header里的executeTime*
      * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int64 executeTime = 1; * - *
-     **已废弃,请使用header里的executeTime*
-     * 
+ * int64 executeTime = 1; + * @return The executeTime. */ + @java.lang.Override public long getExecuteTime() { return executeTime_; } public static final int TRANSACTIONID_FIELD_NUMBER = 2; - private Object transactionId_; + @SuppressWarnings("serial") + private volatile java.lang.Object transactionId_ = ""; /** - * optional string transactionId = 2; - * *
-     **已废弃,Begin里不提供事务id*
+     * *已废弃,Begin里不提供事务id*
      * 
- */ - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string transactionId = 2; * - *
-     **已废弃,Begin里不提供事务id*
-     * 
+ * string transactionId = 2; + * @return The transactionId. */ - public String getTransactionId() { - Object ref = transactionId_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; return s; } } /** - * optional string transactionId = 2; - * *
-     **已废弃,Begin里不提供事务id*
+     * *已废弃,Begin里不提供事务id*
      * 
+ * + * string transactionId = 2; + * @return The bytes for transactionId. */ + @java.lang.Override public com.google.protobuf.ByteString getTransactionIdBytes() { - Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); transactionId_ = b; return b; } else { @@ -10004,90 +10599,83 @@ public String getTransactionId() { } public static final int PROPS_FIELD_NUMBER = 3; - private java.util.List props_; + @SuppressWarnings("serial") + private java.util.List props_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List getPropsList() { + @java.lang.Override + public java.util.List getPropsList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List + @java.lang.Override + public java.util.List getPropsOrBuilderList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ + @java.lang.Override public int getPropsCount() { return props_.size(); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair getProps(int index) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public PairOrBuilder getPropsOrBuilder( + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } public static final int THREADID_FIELD_NUMBER = 4; - private long threadId_; + private long threadId_ = 0L; /** - * optional int64 threadId = 4; - * *
-     **执行的thread Id*
+     * *执行的thread Id*
      * 
- */ - public boolean hasThreadId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int64 threadId = 4; * - *
-     **执行的thread Id*
-     * 
+ * int64 threadId = 4; + * @return The threadId. */ + @java.lang.Override public long getThreadId() { return threadId_; } - private void initFields() { - executeTime_ = 0L; - transactionId_ = ""; - props_ = java.util.Collections.emptyList(); - threadId_ = 0L; - } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -10097,218 +10685,271 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (executeTime_ != 0L) { output.writeInt64(1, executeTime_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getTransactionIdBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, transactionId_); } for (int i = 0; i < props_.size(); i++) { output.writeMessage(3, props_.get(i)); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (threadId_ != 0L) { output.writeInt64(4, threadId_); } getUnknownFields().writeTo(output); } - private int memoizedSerializedSize = -1; + @java.lang.Override public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (executeTime_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, executeTime_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getTransactionIdBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, transactionId_); } for (int i = 0; i < props_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, props_.get(i)); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (threadId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, threadId_); } size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; + memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin)) { + return super.equals(obj); + } + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin other = (com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin) obj; + + if (getExecuteTime() + != other.getExecuteTime()) return false; + if (!getTransactionId() + .equals(other.getTransactionId())) return false; + if (!getPropsList() + .equals(other.getPropsList())) return false; + if (getThreadId() + != other.getThreadId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - public static TransactionBegin parseFrom( + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXECUTETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getExecuteTime()); + hash = (37 * hash) + TRANSACTIONID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + if (getPropsCount() > 0) { + hash = (37 * hash) + PROPS_FIELD_NUMBER; + hash = (53 * hash) + getPropsList().hashCode(); + } + hash = (37 * hash) + THREADID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getThreadId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static TransactionBegin parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static TransactionBegin parseFrom(byte[] data) + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static TransactionBegin parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static TransactionBegin parseFrom(java.io.InputStream input) + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static TransactionBegin parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static TransactionBegin parseDelimitedFrom(java.io.InputStream input) + + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); } - public static TransactionBegin parseDelimitedFrom( + + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static TransactionBegin parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static TransactionBegin parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(TransactionBegin prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} - * *
-     **开始事务的一些信息*
+     * *开始事务的一些信息*
      * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.TransactionBegin) - TransactionBeginOrBuilder { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBeginOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable .ensureFieldAccessorsInitialized( - TransactionBegin.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.Builder.class); } // Construct using com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPropsFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; executeTime_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + props_ = null; propsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); threadId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; } - public TransactionBegin getDefaultInstanceForType() { - return TransactionBegin.getDefaultInstance(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.getDefaultInstance(); } - public TransactionBegin build() { - TransactionBegin result = buildPartial(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin build() { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public TransactionBegin buildPartial() { - TransactionBegin result = new TransactionBegin(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.executeTime_ = executeTime_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.transactionId_ = transactionId_; + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result = new com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result) { if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { props_ = java.util.Collections.unmodifiableList(props_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -10316,32 +10957,39 @@ public TransactionBegin buildPartial() { } else { result.props_ = propsBuilder_.build(); } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000004; + } + + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.executeTime_ = executeTime_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.transactionId_ = transactionId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.threadId_ = threadId_; } - result.threadId_ = threadId_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof TransactionBegin) { - return mergeFrom((TransactionBegin)other); + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(TransactionBegin other) { - if (other == TransactionBegin.getDefaultInstance()) return this; - if (other.hasExecuteTime()) { + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.getDefaultInstance()) return this; + if (other.getExecuteTime() != 0L) { setExecuteTime(other.getExecuteTime()); } - if (other.hasTransactionId()) { - bitField0_ |= 0x00000002; + if (!other.getTransactionId().isEmpty()) { transactionId_ = other.transactionId_; + bitField0_ |= 0x00000002; onChanged(); } if (propsBuilder_ == null) { @@ -10362,7 +11010,7 @@ public Builder mergeFrom(TransactionBegin other) { propsBuilder_ = null; props_ = other.props_; bitField0_ = (bitField0_ & ~0x00000004); - propsBuilder_ = + propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; } else { @@ -10370,76 +11018,116 @@ public Builder mergeFrom(TransactionBegin other) { } } } - if (other.hasThreadId()) { + if (other.getThreadId() != 0L) { setThreadId(other.getThreadId()); } this.mergeUnknownFields(other.getUnknownFields()); + 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 { - TransactionBegin parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + executeTime_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + transactionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.alibaba.otter.canal.protocol.CanalEntry.Pair m = + input.readMessage( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.parser(), + extensionRegistry); + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(m); + } else { + propsBuilder_.addMessage(m); + } + break; + } // case 26 + case 32: { + threadId_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (TransactionBegin) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; private long executeTime_ ; /** - * optional int64 executeTime = 1; - * *
-       **已废弃,请使用header里的executeTime*
+       * *已废弃,请使用header里的executeTime*
        * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int64 executeTime = 1; * - *
-       **已废弃,请使用header里的executeTime*
-       * 
+ * int64 executeTime = 1; + * @return The executeTime. */ + @java.lang.Override public long getExecuteTime() { return executeTime_; } /** - * optional int64 executeTime = 1; - * *
-       **已废弃,请使用header里的executeTime*
+       * *已废弃,请使用header里的executeTime*
        * 
+ * + * int64 executeTime = 1; + * @param value The executeTime to set. + * @return This builder for chaining. */ public Builder setExecuteTime(long value) { - bitField0_ |= 0x00000001; + executeTime_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional int64 executeTime = 1; - * *
-       **已废弃,请使用header里的executeTime*
+       * *已废弃,请使用header里的executeTime*
        * 
+ * + * int64 executeTime = 1; + * @return This builder for chaining. */ public Builder clearExecuteTime() { bitField0_ = (bitField0_ & ~0x00000001); @@ -10448,52 +11136,42 @@ public Builder clearExecuteTime() { return this; } - private Object transactionId_ = ""; + private java.lang.Object transactionId_ = ""; /** - * optional string transactionId = 2; - * *
-       **已废弃,Begin里不提供事务id*
+       * *已废弃,Begin里不提供事务id*
        * 
- */ - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string transactionId = 2; * - *
-       **已废弃,Begin里不提供事务id*
-       * 
+ * string transactionId = 2; + * @return The transactionId. */ - public String getTransactionId() { - Object ref = transactionId_; - if (!(ref instanceof String)) { + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string transactionId = 2; - * *
-       **已废弃,Begin里不提供事务id*
+       * *已废弃,Begin里不提供事务id*
        * 
+ * + * string transactionId = 2; + * @return The bytes for transactionId. */ public com.google.protobuf.ByteString getTransactionIdBytes() { - Object ref = transactionId_; + java.lang.Object ref = transactionId_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); transactionId_ = b; return b; } else { @@ -10501,73 +11179,75 @@ public String getTransactionId() { } } /** - * optional string transactionId = 2; - * *
-       **已废弃,Begin里不提供事务id*
+       * *已废弃,Begin里不提供事务id*
        * 
+ * + * string transactionId = 2; + * @param value The transactionId to set. + * @return This builder for chaining. */ public Builder setTransactionId( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } transactionId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * optional string transactionId = 2; - * *
-       **已废弃,Begin里不提供事务id*
+       * *已废弃,Begin里不提供事务id*
        * 
+ * + * string transactionId = 2; + * @return This builder for chaining. */ public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000002); transactionId_ = getDefaultInstance().getTransactionId(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** - * optional string transactionId = 2; - * *
-       **已废弃,Begin里不提供事务id*
+       * *已废弃,Begin里不提供事务id*
        * 
+ * + * string transactionId = 2; + * @param value The bytes for transactionId to set. + * @return This builder for chaining. */ public Builder setTransactionIdBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); transactionId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - private java.util.List props_ = + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(props_); + if (!((bitField0_ & 0x00000004) != 0)) { + props_ = new java.util.ArrayList(props_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> propsBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List getPropsList() { + public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); } else { @@ -10575,11 +11255,11 @@ public java.util.List getPropsList() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public int getPropsCount() { if (propsBuilder_ == null) { @@ -10589,13 +11269,13 @@ public int getPropsCount() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair getProps(int index) { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -10603,14 +11283,14 @@ public Pair getProps(int index) { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder setProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -10624,14 +11304,14 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder setProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.set(index, builderForValue.build()); @@ -10642,13 +11322,13 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Builder addProps(Pair value) { + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -10662,14 +11342,14 @@ public Builder addProps(Pair value) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -10683,14 +11363,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addProps( - Pair.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(builderForValue.build()); @@ -10701,14 +11381,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(index, builderForValue.build()); @@ -10719,14 +11399,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addAllProps( - Iterable values) { + java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -10738,11 +11418,11 @@ public Builder addAllProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder clearProps() { if (propsBuilder_ == null) { @@ -10755,11 +11435,11 @@ public Builder clearProps() { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder removeProps(int index) { if (propsBuilder_ == null) { @@ -10772,24 +11452,24 @@ public Builder removeProps(int index) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair.Builder getPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public PairOrBuilder getPropsOrBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -10797,13 +11477,13 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List + public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { return propsBuilder_.getMessageOrBuilderList(); @@ -10812,47 +11492,47 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair.Builder addPropsBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( - Pair.getDefaultInstance()); + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair.Builder addPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( - index, Pair.getDefaultInstance()); + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List + public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> getPropsFieldBuilder() { if (propsBuilder_ == null) { propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( props_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); props_ = null; @@ -10862,44 +11542,40 @@ public Pair.Builder addPropsBuilder( private long threadId_ ; /** - * optional int64 threadId = 4; - * *
-       **执行的thread Id*
+       * *执行的thread Id*
        * 
- */ - public boolean hasThreadId() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int64 threadId = 4; * - *
-       **执行的thread Id*
-       * 
+ * int64 threadId = 4; + * @return The threadId. */ + @java.lang.Override public long getThreadId() { return threadId_; } /** - * optional int64 threadId = 4; - * *
-       **执行的thread Id*
+       * *执行的thread Id*
        * 
+ * + * int64 threadId = 4; + * @param value The threadId to set. + * @return This builder for chaining. */ public Builder setThreadId(long value) { - bitField0_ |= 0x00000008; + threadId_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** - * optional int64 threadId = 4; - * *
-       **执行的thread Id*
+       * *执行的thread Id*
        * 
+ * + * int64 threadId = 4; + * @return This builder for chaining. */ public Builder clearThreadId() { bitField0_ = (bitField0_ & ~0x00000008); @@ -10911,12 +11587,52 @@ public Builder clearThreadId() { // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.TransactionBegin) } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionBegin) + private static final com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin DEFAULT_INSTANCE; static { - defaultInstance = new TransactionBegin(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransactionBegin parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionBegin) } public interface TransactionEndOrBuilder extends @@ -10924,279 +11640,177 @@ public interface TransactionEndOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int64 executeTime = 1; - * *
-     **已废弃,请使用header里的executeTime*
+     * *已废弃,请使用header里的executeTime*
      * 
- */ - boolean hasExecuteTime(); - /** - * optional int64 executeTime = 1; * - *
-     **已废弃,请使用header里的executeTime*
-     * 
+ * int64 executeTime = 1; + * @return The executeTime. */ long getExecuteTime(); /** - * optional string transactionId = 2; - * *
-     **事务号*
+     * *事务号*
      * 
- */ - boolean hasTransactionId(); - /** - * optional string transactionId = 2; * - *
-     **事务号*
-     * 
+ * string transactionId = 2; + * @return The transactionId. */ - String getTransactionId(); + java.lang.String getTransactionId(); /** - * optional string transactionId = 2; - * *
-     **事务号*
+     * *事务号*
      * 
+ * + * string transactionId = 2; + * @return The bytes for transactionId. */ com.google.protobuf.ByteString getTransactionIdBytes(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - java.util.List + java.util.List getPropsList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - Pair getProps(int index); + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ int getPropsCount(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - java.util.List + java.util.List getPropsOrBuilderList(); /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - PairOrBuilder getPropsOrBuilder(int index); + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} - * *
-   **结束事务的一些信息*
+   * *结束事务的一些信息*
    * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} */ public static final class TransactionEnd extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionEnd) TransactionEndOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + TransactionEnd.class.getName()); + } // Use TransactionEnd.newBuilder() to construct. private TransactionEnd(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private TransactionEnd(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final TransactionEnd defaultInstance; - public static TransactionEnd getDefaultInstance() { - return defaultInstance; } - - public TransactionEnd getDefaultInstanceForType() { - return defaultInstance; + private TransactionEnd() { + transactionId_ = ""; + props_ = java.util.Collections.emptyList(); } - private final com.google.protobuf.UnknownFieldSet unknownFields; - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TransactionEnd( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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 (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - executeTime_ = input.readInt64(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - transactionId_ = bs; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - props_.add(input.readMessage(Pair.PARSER, extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable .ensureFieldAccessorsInitialized( - TransactionEnd.class, Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public TransactionEnd parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransactionEnd(input, extensionRegistry); - } - }; - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.Builder.class); } - private int bitField0_; public static final int EXECUTETIME_FIELD_NUMBER = 1; - private long executeTime_; + private long executeTime_ = 0L; /** - * optional int64 executeTime = 1; - * *
-     **已废弃,请使用header里的executeTime*
+     * *已废弃,请使用header里的executeTime*
      * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int64 executeTime = 1; * - *
-     **已废弃,请使用header里的executeTime*
-     * 
+ * int64 executeTime = 1; + * @return The executeTime. */ + @java.lang.Override public long getExecuteTime() { return executeTime_; } public static final int TRANSACTIONID_FIELD_NUMBER = 2; - private Object transactionId_; + @SuppressWarnings("serial") + private volatile java.lang.Object transactionId_ = ""; /** - * optional string transactionId = 2; - * *
-     **事务号*
+     * *事务号*
      * 
- */ - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string transactionId = 2; * - *
-     **事务号*
-     * 
+ * string transactionId = 2; + * @return The transactionId. */ - public String getTransactionId() { - Object ref = transactionId_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; return s; } } /** - * optional string transactionId = 2; - * *
-     **事务号*
+     * *事务号*
      * 
+ * + * string transactionId = 2; + * @return The bytes for transactionId. */ + @java.lang.Override public com.google.protobuf.ByteString getTransactionIdBytes() { - Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); transactionId_ = b; return b; } else { @@ -11205,66 +11819,68 @@ public String getTransactionId() { } public static final int PROPS_FIELD_NUMBER = 3; - private java.util.List props_; + @SuppressWarnings("serial") + private java.util.List props_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List getPropsList() { + @java.lang.Override + public java.util.List getPropsList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List + @java.lang.Override + public java.util.List getPropsOrBuilderList() { return props_; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ + @java.lang.Override public int getPropsCount() { return props_.size(); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair getProps(int index) { + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public PairOrBuilder getPropsOrBuilder( + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } - private void initFields() { - executeTime_ = 0L; - transactionId_ = ""; - props_ = java.util.Collections.emptyList(); - } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -11274,14 +11890,14 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (executeTime_ != 0L) { output.writeInt64(1, executeTime_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getTransactionIdBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, transactionId_); } for (int i = 0; i < props_.size(); i++) { output.writeMessage(3, props_.get(i)); @@ -11289,194 +11905,243 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) getUnknownFields().writeTo(output); } - private int memoizedSerializedSize = -1; + @java.lang.Override public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (executeTime_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, executeTime_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getTransactionIdBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, transactionId_); } for (int i = 0; i < props_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, props_.get(i)); } size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; + memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd)) { + return super.equals(obj); + } + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd other = (com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd) obj; + + if (getExecuteTime() + != other.getExecuteTime()) return false; + if (!getTransactionId() + .equals(other.getTransactionId())) return false; + if (!getPropsList() + .equals(other.getPropsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + EXECUTETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getExecuteTime()); + hash = (37 * hash) + TRANSACTIONID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + if (getPropsCount() > 0) { + hash = (37 * hash) + PROPS_FIELD_NUMBER; + hash = (53 * hash) + getPropsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - public static TransactionEnd parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static TransactionEnd parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static TransactionEnd parseFrom(byte[] data) + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static TransactionEnd parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static TransactionEnd parseFrom(java.io.InputStream input) + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static TransactionEnd parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static TransactionEnd parseDelimitedFrom(java.io.InputStream input) + + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); } - public static TransactionEnd parseDelimitedFrom( + + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static TransactionEnd parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static TransactionEnd parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(TransactionEnd prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} - * *
-     **结束事务的一些信息*
+     * *结束事务的一些信息*
      * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.TransactionEnd) - TransactionEndOrBuilder { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEndOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable .ensureFieldAccessorsInitialized( - TransactionEnd.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.Builder.class); } // Construct using com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPropsFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; executeTime_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + props_ = null; propsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; } - public TransactionEnd getDefaultInstanceForType() { - return TransactionEnd.getDefaultInstance(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.getDefaultInstance(); } - public TransactionEnd build() { - TransactionEnd result = buildPartial(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd build() { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public TransactionEnd buildPartial() { - TransactionEnd result = new TransactionEnd(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.executeTime_ = executeTime_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.transactionId_ = transactionId_; + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result = new com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result) { if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { props_ = java.util.Collections.unmodifiableList(props_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -11484,28 +12149,36 @@ public TransactionEnd buildPartial() { } else { result.props_ = propsBuilder_.build(); } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; } + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.executeTime_ = executeTime_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.transactionId_ = transactionId_; + } + } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof TransactionEnd) { - return mergeFrom((TransactionEnd)other); + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(TransactionEnd other) { - if (other == TransactionEnd.getDefaultInstance()) return this; - if (other.hasExecuteTime()) { + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.getDefaultInstance()) return this; + if (other.getExecuteTime() != 0L) { setExecuteTime(other.getExecuteTime()); } - if (other.hasTransactionId()) { - bitField0_ |= 0x00000002; + if (!other.getTransactionId().isEmpty()) { transactionId_ = other.transactionId_; + bitField0_ |= 0x00000002; onChanged(); } if (propsBuilder_ == null) { @@ -11526,7 +12199,7 @@ public Builder mergeFrom(TransactionEnd other) { propsBuilder_ = null; props_ = other.props_; bitField0_ = (bitField0_ & ~0x00000004); - propsBuilder_ = + propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; } else { @@ -11535,72 +12208,107 @@ public Builder mergeFrom(TransactionEnd other) { } } this.mergeUnknownFields(other.getUnknownFields()); + 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 { - TransactionEnd parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + executeTime_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + transactionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.alibaba.otter.canal.protocol.CanalEntry.Pair m = + input.readMessage( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.parser(), + extensionRegistry); + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(m); + } else { + propsBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (TransactionEnd) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; private long executeTime_ ; /** - * optional int64 executeTime = 1; - * *
-       **已废弃,请使用header里的executeTime*
+       * *已废弃,请使用header里的executeTime*
        * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int64 executeTime = 1; * - *
-       **已废弃,请使用header里的executeTime*
-       * 
+ * int64 executeTime = 1; + * @return The executeTime. */ + @java.lang.Override public long getExecuteTime() { return executeTime_; } /** - * optional int64 executeTime = 1; - * *
-       **已废弃,请使用header里的executeTime*
+       * *已废弃,请使用header里的executeTime*
        * 
+ * + * int64 executeTime = 1; + * @param value The executeTime to set. + * @return This builder for chaining. */ public Builder setExecuteTime(long value) { - bitField0_ |= 0x00000001; + executeTime_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional int64 executeTime = 1; - * *
-       **已废弃,请使用header里的executeTime*
+       * *已废弃,请使用header里的executeTime*
        * 
+ * + * int64 executeTime = 1; + * @return This builder for chaining. */ public Builder clearExecuteTime() { bitField0_ = (bitField0_ & ~0x00000001); @@ -11609,52 +12317,42 @@ public Builder clearExecuteTime() { return this; } - private Object transactionId_ = ""; + private java.lang.Object transactionId_ = ""; /** - * optional string transactionId = 2; - * *
-       **事务号*
+       * *事务号*
        * 
- */ - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string transactionId = 2; * - *
-       **事务号*
-       * 
+ * string transactionId = 2; + * @return The transactionId. */ - public String getTransactionId() { - Object ref = transactionId_; - if (!(ref instanceof String)) { + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string transactionId = 2; - * *
-       **事务号*
+       * *事务号*
        * 
+ * + * string transactionId = 2; + * @return The bytes for transactionId. */ public com.google.protobuf.ByteString getTransactionIdBytes() { - Object ref = transactionId_; + java.lang.Object ref = transactionId_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); transactionId_ = b; return b; } else { @@ -11662,73 +12360,75 @@ public String getTransactionId() { } } /** - * optional string transactionId = 2; - * *
-       **事务号*
+       * *事务号*
        * 
+ * + * string transactionId = 2; + * @param value The transactionId to set. + * @return This builder for chaining. */ public Builder setTransactionId( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } transactionId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * optional string transactionId = 2; - * *
-       **事务号*
+       * *事务号*
        * 
+ * + * string transactionId = 2; + * @return This builder for chaining. */ public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000002); transactionId_ = getDefaultInstance().getTransactionId(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** - * optional string transactionId = 2; - * *
-       **事务号*
+       * *事务号*
        * 
+ * + * string transactionId = 2; + * @param value The bytes for transactionId to set. + * @return This builder for chaining. */ public Builder setTransactionIdBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); transactionId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - private java.util.List props_ = + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(props_); + if (!((bitField0_ & 0x00000004) != 0)) { + props_ = new java.util.ArrayList(props_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> propsBuilder_; + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List getPropsList() { + public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); } else { @@ -11736,11 +12436,11 @@ public java.util.List getPropsList() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public int getPropsCount() { if (propsBuilder_ == null) { @@ -11750,13 +12450,13 @@ public int getPropsCount() { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair getProps(int index) { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -11764,14 +12464,14 @@ public Pair getProps(int index) { } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder setProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -11785,14 +12485,14 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder setProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.set(index, builderForValue.build()); @@ -11803,13 +12503,13 @@ public Builder setProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Builder addProps(Pair value) { + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -11823,14 +12523,14 @@ public Builder addProps(Pair value) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addProps( - int index, Pair value) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -11844,14 +12544,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addProps( - Pair.Builder builderForValue) { + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(builderForValue.build()); @@ -11862,14 +12562,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addProps( - int index, Pair.Builder builderForValue) { + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { ensurePropsIsMutable(); props_.add(index, builderForValue.build()); @@ -11880,14 +12580,14 @@ public Builder addProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder addAllProps( - Iterable values) { + java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -11899,11 +12599,11 @@ public Builder addAllProps( return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder clearProps() { if (propsBuilder_ == null) { @@ -11916,11 +12616,11 @@ public Builder clearProps() { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ public Builder removeProps(int index) { if (propsBuilder_ == null) { @@ -11933,24 +12633,24 @@ public Builder removeProps(int index) { return this; } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair.Builder getPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public PairOrBuilder getPropsOrBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { return props_.get(index); } else { @@ -11958,13 +12658,13 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List + public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { return propsBuilder_.getMessageOrBuilderList(); @@ -11973,47 +12673,47 @@ public PairOrBuilder getPropsOrBuilder( } } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair.Builder addPropsBuilder() { + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( - Pair.getDefaultInstance()); + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public Pair.Builder addPropsBuilder( + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( - index, Pair.getDefaultInstance()); + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * *
-       **预留扩展*
+       * *预留扩展*
        * 
+ * + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; */ - public java.util.List + public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder> + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> getPropsFieldBuilder() { if (propsBuilder_ == null) { propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - Pair, Pair.Builder, PairOrBuilder>( + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( props_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); props_ = null; @@ -12024,12 +12724,52 @@ public Pair.Builder addPropsBuilder( // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.TransactionEnd) } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionEnd) + private static final com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd DEFAULT_INSTANCE; static { - defaultInstance = new TransactionEnd(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransactionEnd parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionEnd) } public interface PairOrBuilder extends @@ -12037,176 +12777,104 @@ public interface PairOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional string key = 1; - */ - boolean hasKey(); - /** - * optional string key = 1; + * string key = 1; + * @return The key. */ - String getKey(); + java.lang.String getKey(); /** - * optional string key = 1; + * string key = 1; + * @return The bytes for key. */ com.google.protobuf.ByteString getKeyBytes(); /** - * optional string value = 2; + * string value = 2; + * @return The value. */ - boolean hasValue(); + java.lang.String getValue(); /** - * optional string value = 2; - */ - String getValue(); - /** - * optional string value = 2; + * string value = 2; + * @return The bytes for value. */ com.google.protobuf.ByteString getValueBytes(); } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} - * *
-   **预留扩展*
+   * *预留扩展*
    * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} */ public static final class Pair extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Pair) PairOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Pair.class.getName()); + } // Use Pair.newBuilder() to construct. private Pair(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); - this.unknownFields = builder.getUnknownFields(); } - private Pair(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Pair defaultInstance; - public static Pair getDefaultInstance() { - return defaultInstance; - } - - public Pair getDefaultInstanceForType() { - return defaultInstance; + private Pair() { + key_ = ""; + value_ = ""; } - private final com.google.protobuf.UnknownFieldSet unknownFields; - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Pair( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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 (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - key_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - value_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable .ensureFieldAccessorsInitialized( - Pair.class, Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Pair parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Pair(input, extensionRegistry); - } - }; - - @Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + com.alibaba.otter.canal.protocol.CanalEntry.Pair.class, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder.class); } - private int bitField0_; public static final int KEY_FIELD_NUMBER = 1; - private Object key_; - /** - * optional string key = 1; - */ - public boolean hasKey() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; /** - * optional string key = 1; + * string key = 1; + * @return The key. */ - public String getKey() { - Object ref = key_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } + java.lang.String s = bs.toStringUtf8(); + key_ = s; return s; } } /** - * optional string key = 1; + * string key = 1; + * @return The bytes for key. */ + @java.lang.Override public com.google.protobuf.ByteString getKeyBytes() { - Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); key_ = b; return b; } else { @@ -12215,40 +12883,37 @@ public String getKey() { } public static final int VALUE_FIELD_NUMBER = 2; - private Object value_; - /** - * optional string value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; /** - * optional string value = 2; + * string value = 2; + * @return The value. */ - public String getValue() { - Object ref = value_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } + java.lang.String s = bs.toStringUtf8(); + value_ = s; return s; } } /** - * optional string value = 2; + * string value = 2; + * @return The bytes for value. */ + @java.lang.Override public com.google.protobuf.ByteString getValueBytes() { - Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); value_ = b; return b; } else { @@ -12256,11 +12921,8 @@ public String getValue() { } } - private void initFields() { - key_ = ""; - value_ = ""; - } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -12270,280 +12932,345 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getKeyBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getValueBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); } getUnknownFields().writeTo(output); } - private int memoizedSerializedSize = -1; + @java.lang.Override public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getKeyBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getValueBytes()); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(value_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); } size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; + memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - protected Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalEntry.Pair)) { + return super.equals(obj); + } + com.alibaba.otter.canal.protocol.CanalEntry.Pair other = (com.alibaba.otter.canal.protocol.CanalEntry.Pair) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getValue() + .equals(other.getValue())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - public static Pair parseFrom( + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Pair parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Pair parseFrom(byte[] data) + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Pair parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Pair parseFrom(java.io.InputStream input) + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static Pair parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Pair parseDelimitedFrom(java.io.InputStream input) + + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); } - public static Pair parseDelimitedFrom( + + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static Pair parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); } - public static Pair parseFrom( + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(Pair prototype) { - return newBuilder().mergeFrom(prototype); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} - * *
-     **预留扩展*
+     * *预留扩展*
      * 
+ * + * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Pair) - PairOrBuilder { + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; } - protected FieldAccessorTable + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable .ensureFieldAccessorsInitialized( - Pair.class, Builder.class); + com.alibaba.otter.canal.protocol.CanalEntry.Pair.class, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder.class); } // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Pair.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; key_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); value_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; } - public Pair getDefaultInstanceForType() { - return Pair.getDefaultInstance(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance(); } - public Pair build() { - Pair result = buildPartial(); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair build() { + com.alibaba.otter.canal.protocol.CanalEntry.Pair result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Pair buildPartial() { - Pair result = new Pair(this); + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.Pair result = new com.alibaba.otter.canal.protocol.CanalEntry.Pair(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalEntry.Pair result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; } - result.key_ = key_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; } - result.value_ = value_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Pair) { - return mergeFrom((Pair)other); + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Pair) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Pair)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Pair other) { - if (other == Pair.getDefaultInstance()) return this; - if (other.hasKey()) { - bitField0_ |= 0x00000001; + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Pair other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { key_ = other.key_; + bitField0_ |= 0x00000001; onChanged(); } - if (other.hasValue()) { - bitField0_ |= 0x00000002; + if (!other.getValue().isEmpty()) { value_ = other.value_; + bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); + 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 { - Pair parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Pair) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; - private Object key_ = ""; - /** - * optional string key = 1; - */ - public boolean hasKey() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } + private java.lang.Object key_ = ""; /** - * optional string key = 1; + * string key = 1; + * @return The key. */ - public String getKey() { - Object ref = key_; - if (!(ref instanceof String)) { + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } + java.lang.String s = bs.toStringUtf8(); + key_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string key = 1; + * string key = 1; + * @return The bytes for key. */ public com.google.protobuf.ByteString getKeyBytes() { - Object ref = key_; + java.lang.Object ref = key_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); key_ = b; return b; } else { @@ -12551,75 +13278,71 @@ public String getKey() { } } /** - * optional string key = 1; + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. */ public Builder setKey( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } key_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional string key = 1; + * string key = 1; + * @return This builder for chaining. */ public Builder clearKey() { - bitField0_ = (bitField0_ & ~0x00000001); key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** - * optional string key = 1; + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); key_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } - private Object value_ = ""; - /** - * optional string value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } + private java.lang.Object value_ = ""; /** - * optional string value = 2; + * string value = 2; + * @return The value. */ - public String getValue() { - Object ref = value_; - if (!(ref instanceof String)) { + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } + java.lang.String s = bs.toStringUtf8(); + value_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string value = 2; + * string value = 2; + * @return The bytes for value. */ public com.google.protobuf.ByteString getValueBytes() { - Object ref = value_; + java.lang.Object ref = value_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + (java.lang.String) ref); value_ = b; return b; } else { @@ -12627,37 +13350,39 @@ public String getValue() { } } /** - * optional string value = 2; + * string value = 2; + * @param value The value to set. + * @return This builder for chaining. */ public Builder setValue( - String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } value_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * optional string value = 2; + * string value = 2; + * @return This builder for chaining. */ public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** - * optional string value = 2; + * string value = 2; + * @param value The bytes for value to set. + * @return This builder for chaining. */ public Builder setValueBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); value_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -12665,52 +13390,92 @@ public Builder setValueBytes( // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Pair) } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Pair) + private static final com.alibaba.otter.canal.protocol.CanalEntry.Pair DEFAULT_INSTANCE; static { - defaultInstance = new Pair(true); - defaultInstance.initFields(); + DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalEntry.Pair(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Pair parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Pair) } private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; - private static + private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; - private static + private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; - private static + private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; - private static + private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; - private static + private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; - private static + private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; - private static + private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; - private static + private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable; @@ -12718,121 +13483,120 @@ public Builder setValueBytes( getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - String[] descriptorData = { - "\n\023EntryProtocol.proto\022 com.alibaba.otter" + - ".canal.protocol\"\236\001\n\005Entry\0228\n\006header\030\001 \001(" + - "\0132(.com.alibaba.otter.canal.protocol.Hea" + - "der\022G\n\tentryType\030\002 \001(\0162+.com.alibaba.ott" + - "er.canal.protocol.EntryType:\007ROWDATA\022\022\n\n" + - "storeValue\030\003 \001(\014\"\221\003\n\006Header\022\022\n\007version\030\001" + - " \001(\005:\0011\022\023\n\013logfileName\030\002 \001(\t\022\025\n\rlogfileO" + - "ffset\030\003 \001(\003\022\020\n\010serverId\030\004 \001(\003\022\024\n\014servere" + - "nCode\030\005 \001(\t\022\023\n\013executeTime\030\006 \001(\003\022A\n\nsour" + - "ceType\030\007 \001(\0162&.com.alibaba.otter.canal.p", - "rotocol.Type:\005MYSQL\022\022\n\nschemaName\030\010 \001(\t\022" + - "\021\n\ttableName\030\t \001(\t\022\023\n\013eventLength\030\n \001(\003\022" + - "F\n\teventType\030\013 \001(\0162+.com.alibaba.otter.c" + - "anal.protocol.EventType:\006UPDATE\0225\n\005props" + - "\030\014 \003(\0132&.com.alibaba.otter.canal.protoco" + - "l.Pair\022\014\n\004gtid\030\r \001(\t\"\326\001\n\006Column\022\r\n\005index" + - "\030\001 \001(\005\022\017\n\007sqlType\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\r\n" + - "\005isKey\030\004 \001(\010\022\017\n\007updated\030\005 \001(\010\022\025\n\006isNull\030" + - "\006 \001(\010:\005false\0225\n\005props\030\007 \003(\0132&.com.alibab" + - "a.otter.canal.protocol.Pair\022\r\n\005value\030\010 \001", - "(\t\022\016\n\006length\030\t \001(\005\022\021\n\tmysqlType\030\n \001(\t\"\301\001" + - "\n\007RowData\022?\n\rbeforeColumns\030\001 \003(\0132(.com.a" + - "libaba.otter.canal.protocol.Column\022>\n\014af" + - "terColumns\030\002 \003(\0132(.com.alibaba.otter.can" + - "al.protocol.Column\0225\n\005props\030\003 \003(\0132&.com." + - "alibaba.otter.canal.protocol.Pair\"\222\002\n\tRo" + - "wChange\022\017\n\007tableId\030\001 \001(\003\022F\n\teventType\030\002 " + - "\001(\0162+.com.alibaba.otter.canal.protocol.E" + - "ventType:\006UPDATE\022\024\n\005isDdl\030\n \001(\010:\005false\022\013" + - "\n\003sql\030\013 \001(\t\022;\n\010rowDatas\030\014 \003(\0132).com.alib", - "aba.otter.canal.protocol.RowData\0225\n\005prop" + - "s\030\r \003(\0132&.com.alibaba.otter.canal.protoc" + - "ol.Pair\022\025\n\rddlSchemaName\030\016 \001(\t\"\207\001\n\020Trans" + - "actionBegin\022\023\n\013executeTime\030\001 \001(\003\022\025\n\rtran" + - "sactionId\030\002 \001(\t\0225\n\005props\030\003 \003(\0132&.com.ali" + - "baba.otter.canal.protocol.Pair\022\020\n\010thread" + - "Id\030\004 \001(\003\"s\n\016TransactionEnd\022\023\n\013executeTim" + - "e\030\001 \001(\003\022\025\n\rtransactionId\030\002 \001(\t\0225\n\005props\030" + - "\003 \003(\0132&.com.alibaba.otter.canal.protocol" + - ".Pair\"\"\n\004Pair\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(", - "\t*^\n\tEntryType\022\024\n\020TRANSACTIONBEGIN\020\001\022\013\n\007" + - "ROWDATA\020\002\022\022\n\016TRANSACTIONEND\020\003\022\r\n\tHEARTBE" + - "AT\020\004\022\013\n\007GTIDLOG\020\005*\306\001\n\tEventType\022\n\n\006INSER" + - "T\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELETE\020\003\022\n\n\006CREATE\020\004\022" + - "\t\n\005ALTER\020\005\022\t\n\005ERASE\020\006\022\t\n\005QUERY\020\007\022\014\n\010TRUN" + - "CATE\020\010\022\n\n\006RENAME\020\t\022\n\n\006CINDEX\020\n\022\n\n\006DINDEX" + - "\020\013\022\010\n\004GTID\020\014\022\014\n\010XACOMMIT\020\r\022\016\n\nXAROLLBACK" + - "\020\016\022\016\n\nMHEARTBEAT\020\017*(\n\004Type\022\n\n\006ORACLE\020\001\022\t" + - "\n\005MYSQL\020\002\022\t\n\005PGSQL\020\003B0\n com.alibaba.otte" + - "r.canal.protocolB\nCanalEntryH\001" + java.lang.String[] descriptorData = { + "\n4com/alibaba/otter/canal/protocol/Entry" + + "Protocol.proto\022 com.alibaba.otter.canal." + + "protocol\"\254\001\n\005Entry\0228\n\006header\030\001 \001(\0132(.com" + + ".alibaba.otter.canal.protocol.Header\022@\n\t" + + "entryType\030\002 \001(\0162+.com.alibaba.otter.cana" + + "l.protocol.EntryTypeH\000\022\022\n\nstoreValue\030\003 \001" + + "(\014B\023\n\021entryType_present\"\303\003\n\006Header\022\021\n\007ve" + + "rsion\030\001 \001(\005H\000\022\023\n\013logfileName\030\002 \001(\t\022\025\n\rlo" + + "gfileOffset\030\003 \001(\003\022\020\n\010serverId\030\004 \001(\003\022\024\n\014s" + + "erverenCode\030\005 \001(\t\022\023\n\013executeTime\030\006 \001(\003\022<" + + "\n\nsourceType\030\007 \001(\0162&.com.alibaba.otter.c" + + "anal.protocol.TypeH\001\022\022\n\nschemaName\030\010 \001(\t" + + "\022\021\n\ttableName\030\t \001(\t\022\023\n\013eventLength\030\n \001(\003" + + "\022@\n\teventType\030\013 \001(\0162+.com.alibaba.otter." + + "canal.protocol.EventTypeH\002\0225\n\005props\030\014 \003(" + + "\0132&.com.alibaba.otter.canal.protocol.Pai" + + "r\022\014\n\004gtid\030\r \001(\tB\021\n\017version_presentB\024\n\022so" + + "urceType_presentB\023\n\021eventType_present\"\343\001" + + "\n\006Column\022\r\n\005index\030\001 \001(\005\022\017\n\007sqlType\030\002 \001(\005" + + "\022\014\n\004name\030\003 \001(\t\022\r\n\005isKey\030\004 \001(\010\022\017\n\007updated" + + "\030\005 \001(\010\022\020\n\006isNull\030\006 \001(\010H\000\0225\n\005props\030\007 \003(\0132" + + "&.com.alibaba.otter.canal.protocol.Pair\022" + + "\r\n\005value\030\010 \001(\t\022\016\n\006length\030\t \001(\005\022\021\n\tmysqlT" + + "ype\030\n \001(\tB\020\n\016isNull_present\"\301\001\n\007RowData\022" + + "?\n\rbeforeColumns\030\001 \003(\0132(.com.alibaba.ott" + + "er.canal.protocol.Column\022>\n\014afterColumns" + + "\030\002 \003(\0132(.com.alibaba.otter.canal.protoco" + + "l.Column\0225\n\005props\030\003 \003(\0132&.com.alibaba.ot" + + "ter.canal.protocol.Pair\"\255\002\n\tRowChange\022\017\n" + + "\007tableId\030\001 \001(\003\022@\n\teventType\030\002 \001(\0162+.com." + + "alibaba.otter.canal.protocol.EventTypeH\000" + + "\022\017\n\005isDdl\030\n \001(\010H\001\022\013\n\003sql\030\013 \001(\t\022;\n\010rowDat" + + "as\030\014 \003(\0132).com.alibaba.otter.canal.proto" + + "col.RowData\0225\n\005props\030\r \003(\0132&.com.alibaba" + + ".otter.canal.protocol.Pair\022\025\n\rddlSchemaN" + + "ame\030\016 \001(\tB\023\n\021eventType_presentB\017\n\risDdl_" + + "present\"\207\001\n\020TransactionBegin\022\023\n\013executeT" + + "ime\030\001 \001(\003\022\025\n\rtransactionId\030\002 \001(\t\0225\n\005prop" + + "s\030\003 \003(\0132&.com.alibaba.otter.canal.protoc" + + "ol.Pair\022\020\n\010threadId\030\004 \001(\003\"s\n\016Transaction" + + "End\022\023\n\013executeTime\030\001 \001(\003\022\025\n\rtransactionI" + + "d\030\002 \001(\t\0225\n\005props\030\003 \003(\0132&.com.alibaba.ott" + + "er.canal.protocol.Pair\"\"\n\004Pair\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t*}\n\tEntryType\022\035\n\031ENTRY" + + "TYPECOMPATIBLEPROTO2\020\000\022\024\n\020TRANSACTIONBEG" + + "IN\020\001\022\013\n\007ROWDATA\020\002\022\022\n\016TRANSACTIONEND\020\003\022\r\n" + + "\tHEARTBEAT\020\004\022\013\n\007GTIDLOG\020\005*\345\001\n\tEventType\022" + + "\035\n\031EVENTTYPECOMPATIBLEPROTO2\020\000\022\n\n\006INSERT" + + "\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELETE\020\003\022\n\n\006CREATE\020\004\022\t" + + "\n\005ALTER\020\005\022\t\n\005ERASE\020\006\022\t\n\005QUERY\020\007\022\014\n\010TRUNC" + + "ATE\020\010\022\n\n\006RENAME\020\t\022\n\n\006CINDEX\020\n\022\n\n\006DINDEX\020" + + "\013\022\010\n\004GTID\020\014\022\014\n\010XACOMMIT\020\r\022\016\n\nXAROLLBACK\020" + + "\016\022\016\n\nMHEARTBEAT\020\017*B\n\004Type\022\030\n\024TYPECOMPATI" + + "BLEPROTO2\020\000\022\n\n\006ORACLE\020\001\022\t\n\005MYSQL\020\002\022\t\n\005PG" + + "SQL\020\003B0\n com.alibaba.otter.canal.protoco" + + "lB\nCanalEntryH\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 + descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); + }); internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor, - new String[] { "Header", "EntryType", "StoreValue", }); + new java.lang.String[] { "Header", "EntryType", "StoreValue", "EntryTypePresent", }); internal_static_com_alibaba_otter_canal_protocol_Header_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_Header_descriptor, - new String[] { "Version", "LogfileName", "LogfileOffset", "ServerId", "ServerenCode", "ExecuteTime", "SourceType", "SchemaName", "TableName", "EventLength", "EventType", "Props", "Gtid", }); + new java.lang.String[] { "Version", "LogfileName", "LogfileOffset", "ServerId", "ServerenCode", "ExecuteTime", "SourceType", "SchemaName", "TableName", "EventLength", "EventType", "Props", "Gtid", "VersionPresent", "SourceTypePresent", "EventTypePresent", }); internal_static_com_alibaba_otter_canal_protocol_Column_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_Column_descriptor, - new String[] { "Index", "SqlType", "Name", "IsKey", "Updated", "IsNull", "Props", "Value", "Length", "MysqlType", }); + new java.lang.String[] { "Index", "SqlType", "Name", "IsKey", "Updated", "IsNull", "Props", "Value", "Length", "MysqlType", "IsNullPresent", }); internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor, - new String[] { "BeforeColumns", "AfterColumns", "Props", }); + new java.lang.String[] { "BeforeColumns", "AfterColumns", "Props", }); internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor, - new String[] { "TableId", "EventType", "IsDdl", "Sql", "RowDatas", "Props", "DdlSchemaName", }); + new java.lang.String[] { "TableId", "EventType", "IsDdl", "Sql", "RowDatas", "Props", "DdlSchemaName", "EventTypePresent", "IsDdlPresent", }); internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor, - new String[] { "ExecuteTime", "TransactionId", "Props", "ThreadId", }); + new java.lang.String[] { "ExecuteTime", "TransactionId", "Props", "ThreadId", }); internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor, - new String[] { "ExecuteTime", "TransactionId", "Props", }); + new java.lang.String[] { "ExecuteTime", "TransactionId", "Props", }); internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor, - new String[] { "Key", "Value", }); + new java.lang.String[] { "Key", "Value", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalPacket.java b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalPacket.java index d14053c3e3..a5322071ce 100644 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalPacket.java +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalPacket.java @@ -1,10 +1,21 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: CanalProtocol.proto +// NO CHECKED-IN PROTOBUF GENCODE +// source: com/alibaba/otter/canal/protocol/CanalProtocol.proto +// Protobuf Java Version: 4.29.3 package com.alibaba.otter.canal.protocol; public final class CanalPacket { private CanalPacket() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + CanalPacket.class.getName()); + } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -42,6 +53,15 @@ public enum Compression UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Compression.class.getName()); + } /** * COMPRESSIONCOMPATIBLEPROTO2 = 0; */ @@ -73,6 +93,8 @@ public final int getNumber() { } /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -80,6 +102,10 @@ public static Compression valueOf(int value) { return forNumber(value); } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ public static Compression forNumber(int value) { switch (value) { case 0: return COMPRESSIONCOMPATIBLEPROTO2; @@ -105,6 +131,10 @@ public Compression findValueByNumber(int number) { public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor @@ -146,7 +176,7 @@ public enum PacketType implements com.google.protobuf.ProtocolMessageEnum { /** *
-     *compatible
+     * compatible
      * 
* * PACKAGETYPECOMPATIBLEPROTO2 = 0; @@ -211,9 +241,18 @@ public enum PacketType UNRECOGNIZED(-1), ; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + PacketType.class.getName()); + } /** *
-     *compatible
+     * compatible
      * 
* * PACKAGETYPECOMPATIBLEPROTO2 = 0; @@ -286,6 +325,8 @@ public final int getNumber() { } /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -293,6 +334,10 @@ public static PacketType valueOf(int value) { return forNumber(value); } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ public static PacketType forNumber(int value) { switch (value) { case 0: return PACKAGETYPECOMPATIBLEPROTO2; @@ -326,6 +371,10 @@ public PacketType findValueByNumber(int number) { public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor @@ -366,53 +415,84 @@ public interface PacketOrBuilder extends /** * int32 magic_number = 1; + * @return Whether the magicNumber field is set. + */ + boolean hasMagicNumber(); + /** + * int32 magic_number = 1; + * @return The magicNumber. */ int getMagicNumber(); /** * int32 version = 2; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + * int32 version = 2; + * @return The version. */ int getVersion(); /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The enum numeric value on the wire for type. */ int getTypeValue(); /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The type. */ com.alibaba.otter.canal.protocol.CanalPacket.PacketType getType(); /** * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return Whether the compression field is set. + */ + boolean hasCompression(); + /** + * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return The enum numeric value on the wire for compression. */ int getCompressionValue(); /** * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return The compression. */ com.alibaba.otter.canal.protocol.CanalPacket.Compression getCompression(); /** * bytes body = 5; + * @return The body. */ com.google.protobuf.ByteString getBody(); - public com.alibaba.otter.canal.protocol.CanalPacket.Packet.MagicNumberPresentCase getMagicNumberPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.Packet.MagicNumberPresentCase getMagicNumberPresentCase(); - public com.alibaba.otter.canal.protocol.CanalPacket.Packet.VersionPresentCase getVersionPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.Packet.VersionPresentCase getVersionPresentCase(); - public com.alibaba.otter.canal.protocol.CanalPacket.Packet.CompressionPresentCase getCompressionPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.Packet.CompressionPresentCase getCompressionPresentCase(); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Packet} */ - public static final class Packet extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Packet extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Packet) PacketOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Packet.class.getName()); + } // Use Packet.newBuilder() to construct. - private Packet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Packet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Packet() { @@ -420,83 +500,13 @@ private Packet() { body_ = com.google.protobuf.ByteString.EMPTY; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Packet( - 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: { - magicNumberPresentCase_ = 1; - magicNumberPresent_ = input.readInt32(); - break; - } - case 16: { - versionPresentCase_ = 2; - versionPresent_ = input.readInt32(); - break; - } - case 24: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 32: { - int rawValue = input.readEnum(); - compressionPresentCase_ = 4; - compressionPresent_ = rawValue; - break; - } - case 42: { - - body_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -504,9 +514,11 @@ private Packet( } private int magicNumberPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object magicNumberPresent_; public enum MagicNumberPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { MAGIC_NUMBER(1), MAGICNUMBERPRESENT_NOT_SET(0); private final int value; @@ -514,6 +526,8 @@ private MagicNumberPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -540,9 +554,11 @@ public int getNumber() { } private int versionPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object versionPresent_; public enum VersionPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { VERSION(2), VERSIONPRESENT_NOT_SET(0); private final int value; @@ -550,6 +566,8 @@ private VersionPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -576,9 +594,11 @@ public int getNumber() { } private int compressionPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object compressionPresent_; public enum CompressionPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { COMPRESSION(4), COMPRESSIONPRESENT_NOT_SET(0); private final int value; @@ -586,6 +606,8 @@ private CompressionPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -614,7 +636,17 @@ public int getNumber() { public static final int MAGIC_NUMBER_FIELD_NUMBER = 1; /** * int32 magic_number = 1; + * @return Whether the magicNumber field is set. + */ + @java.lang.Override + public boolean hasMagicNumber() { + return magicNumberPresentCase_ == 1; + } + /** + * int32 magic_number = 1; + * @return The magicNumber. */ + @java.lang.Override public int getMagicNumber() { if (magicNumberPresentCase_ == 1) { return (java.lang.Integer) magicNumberPresent_; @@ -625,7 +657,17 @@ public int getMagicNumber() { public static final int VERSION_FIELD_NUMBER = 2; /** * int32 version = 2; + * @return Whether the version field is set. + */ + @java.lang.Override + public boolean hasVersion() { + return versionPresentCase_ == 2; + } + /** + * int32 version = 2; + * @return The version. */ + @java.lang.Override public int getVersion() { if (versionPresentCase_ == 2) { return (java.lang.Integer) versionPresent_; @@ -634,25 +676,34 @@ public int getVersion() { } public static final int TYPE_FIELD_NUMBER = 3; - private int type_; + private int type_ = 0; /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The enum numeric value on the wire for type. */ - public int getTypeValue() { + @java.lang.Override public int getTypeValue() { return type_; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The type. */ - public com.alibaba.otter.canal.protocol.CanalPacket.PacketType getType() { - @SuppressWarnings("deprecation") - com.alibaba.otter.canal.protocol.CanalPacket.PacketType result = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.valueOf(type_); + @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.PacketType getType() { + com.alibaba.otter.canal.protocol.CanalPacket.PacketType result = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.forNumber(type_); return result == null ? com.alibaba.otter.canal.protocol.CanalPacket.PacketType.UNRECOGNIZED : result; } public static final int COMPRESSION_FIELD_NUMBER = 4; /** * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return Whether the compression field is set. + */ + public boolean hasCompression() { + return compressionPresentCase_ == 4; + } + /** + * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return The enum numeric value on the wire for compression. */ public int getCompressionValue() { if (compressionPresentCase_ == 4) { @@ -662,11 +713,11 @@ public int getCompressionValue() { } /** * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return The compression. */ public com.alibaba.otter.canal.protocol.CanalPacket.Compression getCompression() { if (compressionPresentCase_ == 4) { - @SuppressWarnings("deprecation") - com.alibaba.otter.canal.protocol.CanalPacket.Compression result = com.alibaba.otter.canal.protocol.CanalPacket.Compression.valueOf( + com.alibaba.otter.canal.protocol.CanalPacket.Compression result = com.alibaba.otter.canal.protocol.CanalPacket.Compression.forNumber( (java.lang.Integer) compressionPresent_); return result == null ? com.alibaba.otter.canal.protocol.CanalPacket.Compression.UNRECOGNIZED : result; } @@ -674,10 +725,12 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Compression getCompression() } public static final int BODY_FIELD_NUMBER = 5; - private com.google.protobuf.ByteString body_; + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; /** * bytes body = 5; + * @return The body. */ + @java.lang.Override public com.google.protobuf.ByteString getBody() { return body_; } @@ -713,7 +766,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!body_.isEmpty()) { output.writeBytes(5, body_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -744,7 +797,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, body_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -759,45 +812,38 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.Packet other = (com.alibaba.otter.canal.protocol.CanalPacket.Packet) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && getBody() - .equals(other.getBody()); - result = result && getMagicNumberPresentCase().equals( - other.getMagicNumberPresentCase()); - if (!result) return false; + if (type_ != other.type_) return false; + if (!getBody() + .equals(other.getBody())) return false; + if (!getMagicNumberPresentCase().equals(other.getMagicNumberPresentCase())) return false; switch (magicNumberPresentCase_) { case 1: - result = result && (getMagicNumber() - == other.getMagicNumber()); + if (getMagicNumber() + != other.getMagicNumber()) return false; break; case 0: default: } - result = result && getVersionPresentCase().equals( - other.getVersionPresentCase()); - if (!result) return false; + if (!getVersionPresentCase().equals(other.getVersionPresentCase())) return false; switch (versionPresentCase_) { case 2: - result = result && (getVersion() - == other.getVersion()); + if (getVersion() + != other.getVersion()) return false; break; case 0: default: } - result = result && getCompressionPresentCase().equals( - other.getCompressionPresentCase()); - if (!result) return false; + if (!getCompressionPresentCase().equals(other.getCompressionPresentCase())) return false; switch (compressionPresentCase_) { case 4: - result = result && getCompressionValue() - == other.getCompressionValue(); + if (getCompressionValue() + != other.getCompressionValue()) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -835,7 +881,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -874,39 +920,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -926,7 +974,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -934,7 +982,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.Packet} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Packet) com.alibaba.otter.canal.protocol.CanalPacket.PacketOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -943,7 +991,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -952,26 +1000,20 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Packet.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; type_ = 0; - body_ = com.google.protobuf.ByteString.EMPTY; - magicNumberPresentCase_ = 0; magicNumberPresent_ = null; versionPresentCase_ = 0; @@ -1004,56 +1046,31 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Packet build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Packet buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.Packet result = new com.alibaba.otter.canal.protocol.CanalPacket.Packet(this); - if (magicNumberPresentCase_ == 1) { - result.magicNumberPresent_ = magicNumberPresent_; - } - if (versionPresentCase_ == 2) { - result.versionPresent_ = versionPresent_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.Packet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; } - result.type_ = type_; - if (compressionPresentCase_ == 4) { - result.compressionPresent_ = compressionPresent_; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.body_ = body_; } - result.body_ = body_; + } + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalPacket.Packet result) { result.magicNumberPresentCase_ = magicNumberPresentCase_; + result.magicNumberPresent_ = this.magicNumberPresent_; result.versionPresentCase_ = versionPresentCase_; + result.versionPresent_ = this.versionPresent_; result.compressionPresentCase_ = compressionPresentCase_; - onBuilt(); - return result; + result.compressionPresent_ = this.compressionPresent_; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Packet) { @@ -1099,7 +1116,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Packet oth break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1114,17 +1131,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.Packet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + magicNumberPresent_ = input.readInt32(); + magicNumberPresentCase_ = 1; + break; + } // case 8 + case 16: { + versionPresent_ = input.readInt32(); + versionPresentCase_ = 2; + break; + } // case 16 + case 24: { + type_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + int rawValue = input.readEnum(); + compressionPresentCase_ = 4; + compressionPresent_ = rawValue; + break; + } // case 32 + case 42: { + body_ = input.readBytes(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Packet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int magicNumberPresentCase_ = 0; @@ -1172,9 +1228,18 @@ public Builder clearCompressionPresent() { return this; } + private int bitField0_; /** * int32 magic_number = 1; + * @return Whether the magicNumber field is set. + */ + public boolean hasMagicNumber() { + return magicNumberPresentCase_ == 1; + } + /** + * int32 magic_number = 1; + * @return The magicNumber. */ public int getMagicNumber() { if (magicNumberPresentCase_ == 1) { @@ -1184,8 +1249,11 @@ public int getMagicNumber() { } /** * int32 magic_number = 1; + * @param value The magicNumber to set. + * @return This builder for chaining. */ public Builder setMagicNumber(int value) { + magicNumberPresentCase_ = 1; magicNumberPresent_ = value; onChanged(); @@ -1193,6 +1261,7 @@ public Builder setMagicNumber(int value) { } /** * int32 magic_number = 1; + * @return This builder for chaining. */ public Builder clearMagicNumber() { if (magicNumberPresentCase_ == 1) { @@ -1205,6 +1274,14 @@ public Builder clearMagicNumber() { /** * int32 version = 2; + * @return Whether the version field is set. + */ + public boolean hasVersion() { + return versionPresentCase_ == 2; + } + /** + * int32 version = 2; + * @return The version. */ public int getVersion() { if (versionPresentCase_ == 2) { @@ -1214,8 +1291,11 @@ public int getVersion() { } /** * int32 version = 2; + * @param value The version to set. + * @return This builder for chaining. */ public Builder setVersion(int value) { + versionPresentCase_ = 2; versionPresent_ = value; onChanged(); @@ -1223,6 +1303,7 @@ public Builder setVersion(int value) { } /** * int32 version = 2; + * @return This builder for chaining. */ public Builder clearVersion() { if (versionPresentCase_ == 2) { @@ -1236,43 +1317,51 @@ public Builder clearVersion() { private int type_ = 0; /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The enum numeric value on the wire for type. */ - public int getTypeValue() { + @java.lang.Override public int getTypeValue() { return type_; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return The type. */ + @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.PacketType getType() { - @SuppressWarnings("deprecation") - com.alibaba.otter.canal.protocol.CanalPacket.PacketType result = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.valueOf(type_); + com.alibaba.otter.canal.protocol.CanalPacket.PacketType result = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.forNumber(type_); return result == null ? com.alibaba.otter.canal.protocol.CanalPacket.PacketType.UNRECOGNIZED : result; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @param value The type to set. + * @return This builder for chaining. */ public Builder setType(com.alibaba.otter.canal.protocol.CanalPacket.PacketType value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000004; type_ = value.getNumber(); onChanged(); return this; } /** * .com.alibaba.otter.canal.protocol.PacketType type = 3; + * @return This builder for chaining. */ public Builder clearType() { - + bitField0_ = (bitField0_ & ~0x00000004); type_ = 0; onChanged(); return this; @@ -1280,7 +1369,17 @@ public Builder clearType() { /** * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return Whether the compression field is set. + */ + @java.lang.Override + public boolean hasCompression() { + return compressionPresentCase_ == 4; + } + /** + * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return The enum numeric value on the wire for compression. */ + @java.lang.Override public int getCompressionValue() { if (compressionPresentCase_ == 4) { return ((java.lang.Integer) compressionPresent_).intValue(); @@ -1289,6 +1388,8 @@ public int getCompressionValue() { } /** * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @param value The enum numeric value on the wire for compression to set. + * @return This builder for chaining. */ public Builder setCompressionValue(int value) { compressionPresentCase_ = 4; @@ -1298,11 +1399,12 @@ public Builder setCompressionValue(int value) { } /** * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return The compression. */ + @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Compression getCompression() { if (compressionPresentCase_ == 4) { - @SuppressWarnings("deprecation") - com.alibaba.otter.canal.protocol.CanalPacket.Compression result = com.alibaba.otter.canal.protocol.CanalPacket.Compression.valueOf( + com.alibaba.otter.canal.protocol.CanalPacket.Compression result = com.alibaba.otter.canal.protocol.CanalPacket.Compression.forNumber( (java.lang.Integer) compressionPresent_); return result == null ? com.alibaba.otter.canal.protocol.CanalPacket.Compression.UNRECOGNIZED : result; } @@ -1310,6 +1412,8 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Compression getCompression() } /** * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @param value The compression to set. + * @return This builder for chaining. */ public Builder setCompression(com.alibaba.otter.canal.protocol.CanalPacket.Compression value) { if (value == null) { @@ -1322,6 +1426,7 @@ public Builder setCompression(com.alibaba.otter.canal.protocol.CanalPacket.Compr } /** * .com.alibaba.otter.canal.protocol.Compression compression = 4; + * @return This builder for chaining. */ public Builder clearCompression() { if (compressionPresentCase_ == 4) { @@ -1335,43 +1440,34 @@ public Builder clearCompression() { private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; /** * bytes body = 5; + * @return The body. */ + @java.lang.Override public com.google.protobuf.ByteString getBody() { return body_; } /** * bytes body = 5; + * @param value The body to set. + * @return This builder for chaining. */ public Builder setBody(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } body_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } /** * bytes body = 5; + * @return This builder for chaining. */ public Builder clearBody() { - + bitField0_ = (bitField0_ & ~0x00000010); body_ = getDefaultInstance().getBody(); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Packet) } @@ -1393,7 +1489,18 @@ public Packet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Packet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1419,91 +1526,47 @@ public interface HeartBeatOrBuilder extends /** * int64 send_timestamp = 1; + * @return The sendTimestamp. */ long getSendTimestamp(); /** * int64 start_timestamp = 2; + * @return The startTimestamp. */ long getStartTimestamp(); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.HeartBeat} */ - public static final class HeartBeat extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class HeartBeat extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.HeartBeat) HeartBeatOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + HeartBeat.class.getName()); + } // Use HeartBeat.newBuilder() to construct. - private HeartBeat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private HeartBeat(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private HeartBeat() { - sendTimestamp_ = 0L; - startTimestamp_ = 0L; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HeartBeat( - 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: { - - sendTimestamp_ = input.readInt64(); - break; - } - case 16: { - - startTimestamp_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1511,19 +1574,23 @@ private HeartBeat( } public static final int SEND_TIMESTAMP_FIELD_NUMBER = 1; - private long sendTimestamp_; + private long sendTimestamp_ = 0L; /** * int64 send_timestamp = 1; + * @return The sendTimestamp. */ + @java.lang.Override public long getSendTimestamp() { return sendTimestamp_; } public static final int START_TIMESTAMP_FIELD_NUMBER = 2; - private long startTimestamp_; + private long startTimestamp_ = 0L; /** * int64 start_timestamp = 2; + * @return The startTimestamp. */ + @java.lang.Override public long getStartTimestamp() { return startTimestamp_; } @@ -1548,7 +1615,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (startTimestamp_ != 0L) { output.writeInt64(2, startTimestamp_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1565,7 +1632,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, startTimestamp_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1580,13 +1647,12 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat other = (com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat) obj; - boolean result = true; - result = result && (getSendTimestamp() - == other.getSendTimestamp()); - result = result && (getStartTimestamp() - == other.getStartTimestamp()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getSendTimestamp() + != other.getSendTimestamp()) return false; + if (getStartTimestamp() + != other.getStartTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -1602,7 +1668,7 @@ public int hashCode() { hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStartTimestamp()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1641,39 +1707,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -1693,7 +1761,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1701,7 +1769,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.HeartBeat} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.HeartBeat) com.alibaba.otter.canal.protocol.CanalPacket.HeartBeatOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1710,7 +1778,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1719,26 +1787,20 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; sendTimestamp_ = 0L; - startTimestamp_ = 0L; - return this; } @@ -1765,44 +1827,21 @@ public com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat result = new com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat(this); - result.sendTimestamp_ = sendTimestamp_; - result.startTimestamp_ = startTimestamp_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sendTimestamp_ = sendTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTimestamp_ = startTimestamp_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat) { @@ -1821,7 +1860,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat if (other.getStartTimestamp() != 0L) { setStartTimestamp(other.getStartTimestamp()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1836,41 +1875,71 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + sendTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + startTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private long sendTimestamp_ ; /** * int64 send_timestamp = 1; + * @return The sendTimestamp. */ + @java.lang.Override public long getSendTimestamp() { return sendTimestamp_; } /** * int64 send_timestamp = 1; + * @param value The sendTimestamp to set. + * @return This builder for chaining. */ public Builder setSendTimestamp(long value) { - + sendTimestamp_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** * int64 send_timestamp = 1; + * @return This builder for chaining. */ public Builder clearSendTimestamp() { - + bitField0_ = (bitField0_ & ~0x00000001); sendTimestamp_ = 0L; onChanged(); return this; @@ -1879,40 +1948,34 @@ public Builder clearSendTimestamp() { private long startTimestamp_ ; /** * int64 start_timestamp = 2; + * @return The startTimestamp. */ + @java.lang.Override public long getStartTimestamp() { return startTimestamp_; } /** * int64 start_timestamp = 2; + * @param value The startTimestamp to set. + * @return This builder for chaining. */ public Builder setStartTimestamp(long value) { - + startTimestamp_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** * int64 start_timestamp = 2; + * @return This builder for chaining. */ public Builder clearStartTimestamp() { - + bitField0_ = (bitField0_ & ~0x00000002); startTimestamp_ = 0L; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.HeartBeat) } @@ -1934,7 +1997,18 @@ public HeartBeat parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HeartBeat(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1960,40 +2034,59 @@ public interface HandshakeOrBuilder extends /** * string communication_encoding = 1; + * @return Whether the communicationEncoding field is set. + */ + boolean hasCommunicationEncoding(); + /** + * string communication_encoding = 1; + * @return The communicationEncoding. */ java.lang.String getCommunicationEncoding(); /** * string communication_encoding = 1; + * @return The bytes for communicationEncoding. */ com.google.protobuf.ByteString getCommunicationEncodingBytes(); /** * bytes seeds = 2; + * @return The seeds. */ com.google.protobuf.ByteString getSeeds(); /** * .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + * @return The enum numeric value on the wire for supportedCompressions. */ int getSupportedCompressionsValue(); /** * .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + * @return The supportedCompressions. */ com.alibaba.otter.canal.protocol.CanalPacket.Compression getSupportedCompressions(); - public com.alibaba.otter.canal.protocol.CanalPacket.Handshake.CommunicationEncodingPresentCase getCommunicationEncodingPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.Handshake.CommunicationEncodingPresentCase getCommunicationEncodingPresentCase(); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Handshake} */ - public static final class Handshake extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Handshake extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Handshake) HandshakeOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Handshake.class.getName()); + } // Use Handshake.newBuilder() to construct. - private Handshake(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Handshake(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Handshake() { @@ -2001,73 +2094,13 @@ private Handshake() { supportedCompressions_ = 0; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Handshake( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - communicationEncodingPresentCase_ = 1; - communicationEncodingPresent_ = s; - break; - } - case 18: { - - seeds_ = input.readBytes(); - break; - } - case 24: { - int rawValue = input.readEnum(); - - supportedCompressions_ = rawValue; - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2075,9 +2108,11 @@ private Handshake( } private int communicationEncodingPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object communicationEncodingPresent_; public enum CommunicationEncodingPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { COMMUNICATION_ENCODING(1), COMMUNICATIONENCODINGPRESENT_NOT_SET(0); private final int value; @@ -2085,6 +2120,8 @@ private CommunicationEncodingPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -2113,6 +2150,14 @@ public int getNumber() { public static final int COMMUNICATION_ENCODING_FIELD_NUMBER = 1; /** * string communication_encoding = 1; + * @return Whether the communicationEncoding field is set. + */ + public boolean hasCommunicationEncoding() { + return communicationEncodingPresentCase_ == 1; + } + /** + * string communication_encoding = 1; + * @return The communicationEncoding. */ public java.lang.String getCommunicationEncoding() { java.lang.Object ref = ""; @@ -2133,6 +2178,7 @@ public java.lang.String getCommunicationEncoding() { } /** * string communication_encoding = 1; + * @return The bytes for communicationEncoding. */ public com.google.protobuf.ByteString getCommunicationEncodingBytes() { @@ -2154,28 +2200,31 @@ public java.lang.String getCommunicationEncoding() { } public static final int SEEDS_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString seeds_; + private com.google.protobuf.ByteString seeds_ = com.google.protobuf.ByteString.EMPTY; /** * bytes seeds = 2; + * @return The seeds. */ + @java.lang.Override public com.google.protobuf.ByteString getSeeds() { return seeds_; } public static final int SUPPORTED_COMPRESSIONS_FIELD_NUMBER = 3; - private int supportedCompressions_; + private int supportedCompressions_ = 0; /** * .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + * @return The enum numeric value on the wire for supportedCompressions. */ - public int getSupportedCompressionsValue() { + @java.lang.Override public int getSupportedCompressionsValue() { return supportedCompressions_; } /** * .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + * @return The supportedCompressions. */ - public com.alibaba.otter.canal.protocol.CanalPacket.Compression getSupportedCompressions() { - @SuppressWarnings("deprecation") - com.alibaba.otter.canal.protocol.CanalPacket.Compression result = com.alibaba.otter.canal.protocol.CanalPacket.Compression.valueOf(supportedCompressions_); + @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Compression getSupportedCompressions() { + com.alibaba.otter.canal.protocol.CanalPacket.Compression result = com.alibaba.otter.canal.protocol.CanalPacket.Compression.forNumber(supportedCompressions_); return result == null ? com.alibaba.otter.canal.protocol.CanalPacket.Compression.UNRECOGNIZED : result; } @@ -2194,7 +2243,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (communicationEncodingPresentCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, communicationEncodingPresent_); + com.google.protobuf.GeneratedMessage.writeString(output, 1, communicationEncodingPresent_); } if (!seeds_.isEmpty()) { output.writeBytes(2, seeds_); @@ -2202,7 +2251,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (supportedCompressions_ != com.alibaba.otter.canal.protocol.CanalPacket.Compression.COMPRESSIONCOMPATIBLEPROTO2.getNumber()) { output.writeEnum(3, supportedCompressions_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2212,7 +2261,7 @@ public int getSerializedSize() { size = 0; if (communicationEncodingPresentCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, communicationEncodingPresent_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, communicationEncodingPresent_); } if (!seeds_.isEmpty()) { size += com.google.protobuf.CodedOutputStream @@ -2222,7 +2271,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, supportedCompressions_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2237,23 +2286,20 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.Handshake other = (com.alibaba.otter.canal.protocol.CanalPacket.Handshake) obj; - boolean result = true; - result = result && getSeeds() - .equals(other.getSeeds()); - result = result && supportedCompressions_ == other.supportedCompressions_; - result = result && getCommunicationEncodingPresentCase().equals( - other.getCommunicationEncodingPresentCase()); - if (!result) return false; + if (!getSeeds() + .equals(other.getSeeds())) return false; + if (supportedCompressions_ != other.supportedCompressions_) return false; + if (!getCommunicationEncodingPresentCase().equals(other.getCommunicationEncodingPresentCase())) return false; switch (communicationEncodingPresentCase_) { case 1: - result = result && getCommunicationEncoding() - .equals(other.getCommunicationEncoding()); + if (!getCommunicationEncoding() + .equals(other.getCommunicationEncoding())) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -2275,7 +2321,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2314,39 +2360,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -2366,7 +2414,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2374,7 +2422,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.Handshake} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Handshake) com.alibaba.otter.canal.protocol.CanalPacket.HandshakeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2383,7 +2431,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2392,26 +2440,20 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Handshake.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; seeds_ = com.google.protobuf.ByteString.EMPTY; - supportedCompressions_ = 0; - communicationEncodingPresentCase_ = 0; communicationEncodingPresent_ = null; return this; @@ -2440,48 +2482,27 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Handshake build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Handshake buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.Handshake result = new com.alibaba.otter.canal.protocol.CanalPacket.Handshake(this); - if (communicationEncodingPresentCase_ == 1) { - result.communicationEncodingPresent_ = communicationEncodingPresent_; - } - result.seeds_ = seeds_; - result.supportedCompressions_ = supportedCompressions_; - result.communicationEncodingPresentCase_ = communicationEncodingPresentCase_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.Handshake result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.seeds_ = seeds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.supportedCompressions_ = supportedCompressions_; + } } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalPacket.Handshake result) { + result.communicationEncodingPresentCase_ = communicationEncodingPresentCase_; + result.communicationEncodingPresent_ = this.communicationEncodingPresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Handshake) { @@ -2511,7 +2532,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Handshake break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2526,17 +2547,46 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.Handshake parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + communicationEncodingPresentCase_ = 1; + communicationEncodingPresent_ = s; + break; + } // case 10 + case 18: { + seeds_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + supportedCompressions_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Handshake) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int communicationEncodingPresentCase_ = 0; @@ -2554,14 +2604,25 @@ public Builder clearCommunicationEncodingPresent() { return this; } + private int bitField0_; /** * string communication_encoding = 1; + * @return Whether the communicationEncoding field is set. */ - public java.lang.String getCommunicationEncoding() { - java.lang.Object ref = ""; - if (communicationEncodingPresentCase_ == 1) { - ref = communicationEncodingPresent_; + @java.lang.Override + public boolean hasCommunicationEncoding() { + return communicationEncodingPresentCase_ == 1; + } + /** + * string communication_encoding = 1; + * @return The communicationEncoding. + */ + @java.lang.Override + public java.lang.String getCommunicationEncoding() { + java.lang.Object ref = ""; + if (communicationEncodingPresentCase_ == 1) { + ref = communicationEncodingPresent_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = @@ -2577,7 +2638,9 @@ public java.lang.String getCommunicationEncoding() { } /** * string communication_encoding = 1; + * @return The bytes for communicationEncoding. */ + @java.lang.Override public com.google.protobuf.ByteString getCommunicationEncodingBytes() { java.lang.Object ref = ""; @@ -2598,19 +2661,20 @@ public java.lang.String getCommunicationEncoding() { } /** * string communication_encoding = 1; + * @param value The communicationEncoding to set. + * @return This builder for chaining. */ public Builder setCommunicationEncoding( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - communicationEncodingPresentCase_ = 1; + if (value == null) { throw new NullPointerException(); } + communicationEncodingPresentCase_ = 1; communicationEncodingPresent_ = value; onChanged(); return this; } /** * string communication_encoding = 1; + * @return This builder for chaining. */ public Builder clearCommunicationEncoding() { if (communicationEncodingPresentCase_ == 1) { @@ -2622,13 +2686,13 @@ public Builder clearCommunicationEncoding() { } /** * string communication_encoding = 1; + * @param value The bytes for communicationEncoding to set. + * @return This builder for chaining. */ public Builder setCommunicationEncodingBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); communicationEncodingPresentCase_ = 1; communicationEncodingPresent_ = value; onChanged(); @@ -2638,27 +2702,30 @@ public Builder setCommunicationEncodingBytes( private com.google.protobuf.ByteString seeds_ = com.google.protobuf.ByteString.EMPTY; /** * bytes seeds = 2; + * @return The seeds. */ + @java.lang.Override public com.google.protobuf.ByteString getSeeds() { return seeds_; } /** * bytes seeds = 2; + * @param value The seeds to set. + * @return This builder for chaining. */ public Builder setSeeds(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } seeds_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** * bytes seeds = 2; + * @return This builder for chaining. */ public Builder clearSeeds() { - + bitField0_ = (bitField0_ & ~0x00000002); seeds_ = getDefaultInstance().getSeeds(); onChanged(); return this; @@ -2667,59 +2734,55 @@ public Builder clearSeeds() { private int supportedCompressions_ = 0; /** * .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + * @return The enum numeric value on the wire for supportedCompressions. */ - public int getSupportedCompressionsValue() { + @java.lang.Override public int getSupportedCompressionsValue() { return supportedCompressions_; } /** * .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + * @param value The enum numeric value on the wire for supportedCompressions to set. + * @return This builder for chaining. */ public Builder setSupportedCompressionsValue(int value) { supportedCompressions_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** * .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + * @return The supportedCompressions. */ + @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Compression getSupportedCompressions() { - @SuppressWarnings("deprecation") - com.alibaba.otter.canal.protocol.CanalPacket.Compression result = com.alibaba.otter.canal.protocol.CanalPacket.Compression.valueOf(supportedCompressions_); + com.alibaba.otter.canal.protocol.CanalPacket.Compression result = com.alibaba.otter.canal.protocol.CanalPacket.Compression.forNumber(supportedCompressions_); return result == null ? com.alibaba.otter.canal.protocol.CanalPacket.Compression.UNRECOGNIZED : result; } /** * .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + * @param value The supportedCompressions to set. + * @return This builder for chaining. */ public Builder setSupportedCompressions(com.alibaba.otter.canal.protocol.CanalPacket.Compression value) { if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000004; supportedCompressions_ = value.getNumber(); onChanged(); return this; } /** * .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + * @return This builder for chaining. */ public Builder clearSupportedCompressions() { - + bitField0_ = (bitField0_ & ~0x00000004); supportedCompressions_ = 0; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Handshake) } @@ -2741,7 +2804,18 @@ public Handshake parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Handshake(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2767,10 +2841,12 @@ public interface ClientAuthOrBuilder extends /** * string username = 1; + * @return The username. */ java.lang.String getUsername(); /** * string username = 1; + * @return The bytes for username. */ com.google.protobuf.ByteString getUsernameBytes(); @@ -2781,6 +2857,7 @@ public interface ClientAuthOrBuilder extends * * * bytes password = 2; + * @return The password. */ com.google.protobuf.ByteString getPassword(); @@ -2790,6 +2867,16 @@ public interface ClientAuthOrBuilder extends * * * int32 net_read_timeout = 3; + * @return Whether the netReadTimeout field is set. + */ + boolean hasNetReadTimeout(); + /** + *
+     * in seconds
+     * 
+ * + * int32 net_read_timeout = 3; + * @return The netReadTimeout. */ int getNetReadTimeout(); @@ -2799,47 +2886,64 @@ public interface ClientAuthOrBuilder extends * * * int32 net_write_timeout = 4; + * @return Whether the netWriteTimeout field is set. + */ + boolean hasNetWriteTimeout(); + /** + *
+     * in seconds
+     * 
+ * + * int32 net_write_timeout = 4; + * @return The netWriteTimeout. */ int getNetWriteTimeout(); /** * string destination = 5; + * @return The destination. */ java.lang.String getDestination(); /** * string destination = 5; + * @return The bytes for destination. */ com.google.protobuf.ByteString getDestinationBytes(); /** * string client_id = 6; + * @return The clientId. */ java.lang.String getClientId(); /** * string client_id = 6; + * @return The bytes for clientId. */ com.google.protobuf.ByteString getClientIdBytes(); /** * string filter = 7; + * @return The filter. */ java.lang.String getFilter(); /** * string filter = 7; + * @return The bytes for filter. */ com.google.protobuf.ByteString getFilterBytes(); /** * int64 start_timestamp = 8; + * @return The startTimestamp. */ long getStartTimestamp(); - public com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.NetReadTimeoutPresentCase getNetReadTimeoutPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.NetReadTimeoutPresentCase getNetReadTimeoutPresentCase(); - public com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.NetWriteTimeoutPresentCase getNetWriteTimeoutPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.NetWriteTimeoutPresentCase getNetWriteTimeoutPresentCase(); } /** *
@@ -2848,13 +2952,22 @@ public interface ClientAuthOrBuilder extends
    *
    * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAuth}
    */
-  public  static final class ClientAuth extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public static final class ClientAuth extends
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ClientAuth)
       ClientAuthOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 29,
+        /* patch= */ 3,
+        /* suffix= */ "",
+        ClientAuth.class.getName());
+    }
     // Use ClientAuth.newBuilder() to construct.
-    private ClientAuth(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private ClientAuth(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private ClientAuth() {
@@ -2863,103 +2976,15 @@ private ClientAuth() {
       destination_ = "";
       clientId_ = "";
       filter_ = "";
-      startTimestamp_ = 0L;
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
     }
-    private ClientAuth(
-        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: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              username_ = s;
-              break;
-            }
-            case 18: {
-
-              password_ = input.readBytes();
-              break;
-            }
-            case 24: {
-              netReadTimeoutPresentCase_ = 3;
-              netReadTimeoutPresent_ = input.readInt32();
-              break;
-            }
-            case 32: {
-              netWriteTimeoutPresentCase_ = 4;
-              netWriteTimeoutPresent_ = input.readInt32();
-              break;
-            }
-            case 42: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              destination_ = s;
-              break;
-            }
-            case 50: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              clientId_ = s;
-              break;
-            }
-            case 58: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              filter_ = s;
-              break;
-            }
-            case 64: {
 
-              startTimestamp_ = input.readInt64();
-              break;
-            }
-            default: {
-              if (!parseUnknownFieldProto3(
-                  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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -2967,9 +2992,11 @@ private ClientAuth(
     }
 
     private int netReadTimeoutPresentCase_ = 0;
+    @SuppressWarnings("serial")
     private java.lang.Object netReadTimeoutPresent_;
     public enum NetReadTimeoutPresentCase
-        implements com.google.protobuf.Internal.EnumLite {
+        implements com.google.protobuf.Internal.EnumLite,
+            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
       NET_READ_TIMEOUT(3),
       NETREADTIMEOUTPRESENT_NOT_SET(0);
       private final int value;
@@ -2977,6 +3004,8 @@ private NetReadTimeoutPresentCase(int value) {
         this.value = value;
       }
       /**
+       * @param value The number of the enum to look for.
+       * @return The enum associated with the given number.
        * @deprecated Use {@link #forNumber(int)} instead.
        */
       @java.lang.Deprecated
@@ -3003,9 +3032,11 @@ public int getNumber() {
     }
 
     private int netWriteTimeoutPresentCase_ = 0;
+    @SuppressWarnings("serial")
     private java.lang.Object netWriteTimeoutPresent_;
     public enum NetWriteTimeoutPresentCase
-        implements com.google.protobuf.Internal.EnumLite {
+        implements com.google.protobuf.Internal.EnumLite,
+            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
       NET_WRITE_TIMEOUT(4),
       NETWRITETIMEOUTPRESENT_NOT_SET(0);
       private final int value;
@@ -3013,6 +3044,8 @@ private NetWriteTimeoutPresentCase(int value) {
         this.value = value;
       }
       /**
+       * @param value The number of the enum to look for.
+       * @return The enum associated with the given number.
        * @deprecated Use {@link #forNumber(int)} instead.
        */
       @java.lang.Deprecated
@@ -3039,10 +3072,13 @@ public int getNumber() {
     }
 
     public static final int USERNAME_FIELD_NUMBER = 1;
-    private volatile java.lang.Object username_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object username_ = "";
     /**
      * string username = 1;
+     * @return The username.
      */
+    @java.lang.Override
     public java.lang.String getUsername() {
       java.lang.Object ref = username_;
       if (ref instanceof java.lang.String) {
@@ -3057,7 +3093,9 @@ public java.lang.String getUsername() {
     }
     /**
      * string username = 1;
+     * @return The bytes for username.
      */
+    @java.lang.Override
     public com.google.protobuf.ByteString
         getUsernameBytes() {
       java.lang.Object ref = username_;
@@ -3073,14 +3111,16 @@ public java.lang.String getUsername() {
     }
 
     public static final int PASSWORD_FIELD_NUMBER = 2;
-    private com.google.protobuf.ByteString password_;
+    private com.google.protobuf.ByteString password_ = com.google.protobuf.ByteString.EMPTY;
     /**
      * 
      * hashed password with seeds from Handshake message
      * 
* * bytes password = 2; + * @return The password. */ + @java.lang.Override public com.google.protobuf.ByteString getPassword() { return password_; } @@ -3092,7 +3132,21 @@ public com.google.protobuf.ByteString getPassword() { *
* * int32 net_read_timeout = 3; + * @return Whether the netReadTimeout field is set. + */ + @java.lang.Override + public boolean hasNetReadTimeout() { + return netReadTimeoutPresentCase_ == 3; + } + /** + *
+     * in seconds
+     * 
+ * + * int32 net_read_timeout = 3; + * @return The netReadTimeout. */ + @java.lang.Override public int getNetReadTimeout() { if (netReadTimeoutPresentCase_ == 3) { return (java.lang.Integer) netReadTimeoutPresent_; @@ -3107,7 +3161,21 @@ public int getNetReadTimeout() { * * * int32 net_write_timeout = 4; + * @return Whether the netWriteTimeout field is set. + */ + @java.lang.Override + public boolean hasNetWriteTimeout() { + return netWriteTimeoutPresentCase_ == 4; + } + /** + *
+     * in seconds
+     * 
+ * + * int32 net_write_timeout = 4; + * @return The netWriteTimeout. */ + @java.lang.Override public int getNetWriteTimeout() { if (netWriteTimeoutPresentCase_ == 4) { return (java.lang.Integer) netWriteTimeoutPresent_; @@ -3116,10 +3184,13 @@ public int getNetWriteTimeout() { } public static final int DESTINATION_FIELD_NUMBER = 5; - private volatile java.lang.Object destination_; + @SuppressWarnings("serial") + private volatile java.lang.Object destination_ = ""; /** * string destination = 5; + * @return The destination. */ + @java.lang.Override public java.lang.String getDestination() { java.lang.Object ref = destination_; if (ref instanceof java.lang.String) { @@ -3134,7 +3205,9 @@ public java.lang.String getDestination() { } /** * string destination = 5; + * @return The bytes for destination. */ + @java.lang.Override public com.google.protobuf.ByteString getDestinationBytes() { java.lang.Object ref = destination_; @@ -3150,10 +3223,13 @@ public java.lang.String getDestination() { } public static final int CLIENT_ID_FIELD_NUMBER = 6; - private volatile java.lang.Object clientId_; + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; /** * string client_id = 6; + * @return The clientId. */ + @java.lang.Override public java.lang.String getClientId() { java.lang.Object ref = clientId_; if (ref instanceof java.lang.String) { @@ -3168,7 +3244,9 @@ public java.lang.String getClientId() { } /** * string client_id = 6; + * @return The bytes for clientId. */ + @java.lang.Override public com.google.protobuf.ByteString getClientIdBytes() { java.lang.Object ref = clientId_; @@ -3184,10 +3262,13 @@ public java.lang.String getClientId() { } public static final int FILTER_FIELD_NUMBER = 7; - private volatile java.lang.Object filter_; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; /** * string filter = 7; + * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -3202,7 +3283,9 @@ public java.lang.String getFilter() { } /** * string filter = 7; + * @return The bytes for filter. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; @@ -3218,10 +3301,12 @@ public java.lang.String getFilter() { } public static final int START_TIMESTAMP_FIELD_NUMBER = 8; - private long startTimestamp_; + private long startTimestamp_ = 0L; /** * int64 start_timestamp = 8; + * @return The startTimestamp. */ + @java.lang.Override public long getStartTimestamp() { return startTimestamp_; } @@ -3240,8 +3325,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getUsernameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, username_); } if (!password_.isEmpty()) { output.writeBytes(2, password_); @@ -3254,19 +3339,19 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt32( 4, (int)((java.lang.Integer) netWriteTimeoutPresent_)); } - if (!getDestinationBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, destination_); } - if (!getClientIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, clientId_); } - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, filter_); } if (startTimestamp_ != 0L) { output.writeInt64(8, startTimestamp_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3275,8 +3360,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getUsernameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(username_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, username_); } if (!password_.isEmpty()) { size += com.google.protobuf.CodedOutputStream @@ -3292,20 +3377,20 @@ public int getSerializedSize() { .computeInt32Size( 4, (int)((java.lang.Integer) netWriteTimeoutPresent_)); } - if (!getDestinationBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, destination_); } - if (!getClientIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, clientId_); } - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, filter_); } if (startTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(8, startTimestamp_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3320,43 +3405,38 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth other = (com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth) obj; - boolean result = true; - result = result && getUsername() - .equals(other.getUsername()); - result = result && getPassword() - .equals(other.getPassword()); - result = result && getDestination() - .equals(other.getDestination()); - result = result && getClientId() - .equals(other.getClientId()); - result = result && getFilter() - .equals(other.getFilter()); - result = result && (getStartTimestamp() - == other.getStartTimestamp()); - result = result && getNetReadTimeoutPresentCase().equals( - other.getNetReadTimeoutPresentCase()); - if (!result) return false; + if (!getUsername() + .equals(other.getUsername())) return false; + if (!getPassword() + .equals(other.getPassword())) return false; + if (!getDestination() + .equals(other.getDestination())) return false; + if (!getClientId() + .equals(other.getClientId())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (getStartTimestamp() + != other.getStartTimestamp()) return false; + if (!getNetReadTimeoutPresentCase().equals(other.getNetReadTimeoutPresentCase())) return false; switch (netReadTimeoutPresentCase_) { case 3: - result = result && (getNetReadTimeout() - == other.getNetReadTimeout()); + if (getNetReadTimeout() + != other.getNetReadTimeout()) return false; break; case 0: default: } - result = result && getNetWriteTimeoutPresentCase().equals( - other.getNetWriteTimeoutPresentCase()); - if (!result) return false; + if (!getNetWriteTimeoutPresentCase().equals(other.getNetWriteTimeoutPresentCase())) return false; switch (netWriteTimeoutPresentCase_) { case 4: - result = result && (getNetWriteTimeout() - == other.getNetWriteTimeout()); + if (getNetWriteTimeout() + != other.getNetWriteTimeout()) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -3395,7 +3475,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3434,39 +3514,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -3486,7 +3568,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3498,7 +3580,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAuth} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.ClientAuth) com.alibaba.otter.canal.protocol.CanalPacket.ClientAuthOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -3507,7 +3589,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3516,34 +3598,24 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; username_ = ""; - password_ = com.google.protobuf.ByteString.EMPTY; - destination_ = ""; - clientId_ = ""; - filter_ = ""; - startTimestamp_ = 0L; - netReadTimeoutPresentCase_ = 0; netReadTimeoutPresent_ = null; netWriteTimeoutPresentCase_ = 0; @@ -3574,56 +3646,41 @@ public com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth result = new com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth(this); - result.username_ = username_; - result.password_ = password_; - if (netReadTimeoutPresentCase_ == 3) { - result.netReadTimeoutPresent_ = netReadTimeoutPresent_; - } - if (netWriteTimeoutPresentCase_ == 4) { - result.netWriteTimeoutPresent_ = netWriteTimeoutPresent_; - } - result.destination_ = destination_; - result.clientId_ = clientId_; - result.filter_ = filter_; - result.startTimestamp_ = startTimestamp_; - result.netReadTimeoutPresentCase_ = netReadTimeoutPresentCase_; - result.netWriteTimeoutPresentCase_ = netWriteTimeoutPresentCase_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.username_ = username_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.password_ = password_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.destination_ = destination_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.startTimestamp_ = startTimestamp_; + } } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth result) { + result.netReadTimeoutPresentCase_ = netReadTimeoutPresentCase_; + result.netReadTimeoutPresent_ = this.netReadTimeoutPresent_; + result.netWriteTimeoutPresentCase_ = netWriteTimeoutPresentCase_; + result.netWriteTimeoutPresent_ = this.netWriteTimeoutPresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth) { @@ -3638,6 +3695,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth if (other == com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.getDefaultInstance()) return this; if (!other.getUsername().isEmpty()) { username_ = other.username_; + bitField0_ |= 0x00000001; onChanged(); } if (other.getPassword() != com.google.protobuf.ByteString.EMPTY) { @@ -3645,14 +3703,17 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth } if (!other.getDestination().isEmpty()) { destination_ = other.destination_; + bitField0_ |= 0x00000010; onChanged(); } if (!other.getClientId().isEmpty()) { clientId_ = other.clientId_; + bitField0_ |= 0x00000020; onChanged(); } if (!other.getFilter().isEmpty()) { filter_ = other.filter_; + bitField0_ |= 0x00000040; onChanged(); } if (other.getStartTimestamp() != 0L) { @@ -3676,7 +3737,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3691,17 +3752,70 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + username_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + password_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + netReadTimeoutPresent_ = input.readInt32(); + netReadTimeoutPresentCase_ = 3; + break; + } // case 24 + case 32: { + netWriteTimeoutPresent_ = input.readInt32(); + netWriteTimeoutPresentCase_ = 4; + break; + } // case 32 + case 42: { + destination_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + startTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int netReadTimeoutPresentCase_ = 0; @@ -3734,10 +3848,12 @@ public Builder clearNetWriteTimeoutPresent() { return this; } + private int bitField0_; private java.lang.Object username_ = ""; /** * string username = 1; + * @return The username. */ public java.lang.String getUsername() { java.lang.Object ref = username_; @@ -3753,6 +3869,7 @@ public java.lang.String getUsername() { } /** * string username = 1; + * @return The bytes for username. */ public com.google.protobuf.ByteString getUsernameBytes() { @@ -3769,37 +3886,38 @@ public java.lang.String getUsername() { } /** * string username = 1; + * @param value The username to set. + * @return This builder for chaining. */ public Builder setUsername( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } username_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** * string username = 1; + * @return This builder for chaining. */ public Builder clearUsername() { - username_ = getDefaultInstance().getUsername(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string username = 1; + * @param value The bytes for username to set. + * @return This builder for chaining. */ public Builder setUsernameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); username_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3811,7 +3929,9 @@ public Builder setUsernameBytes( * * * bytes password = 2; + * @return The password. */ + @java.lang.Override public com.google.protobuf.ByteString getPassword() { return password_; } @@ -3821,13 +3941,13 @@ public com.google.protobuf.ByteString getPassword() { * * * bytes password = 2; + * @param value The password to set. + * @return This builder for chaining. */ public Builder setPassword(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } password_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3837,9 +3957,10 @@ public Builder setPassword(com.google.protobuf.ByteString value) { * * * bytes password = 2; + * @return This builder for chaining. */ public Builder clearPassword() { - + bitField0_ = (bitField0_ & ~0x00000002); password_ = getDefaultInstance().getPassword(); onChanged(); return this; @@ -3851,6 +3972,18 @@ public Builder clearPassword() { * * * int32 net_read_timeout = 3; + * @return Whether the netReadTimeout field is set. + */ + public boolean hasNetReadTimeout() { + return netReadTimeoutPresentCase_ == 3; + } + /** + *
+       * in seconds
+       * 
+ * + * int32 net_read_timeout = 3; + * @return The netReadTimeout. */ public int getNetReadTimeout() { if (netReadTimeoutPresentCase_ == 3) { @@ -3864,8 +3997,11 @@ public int getNetReadTimeout() { * * * int32 net_read_timeout = 3; + * @param value The netReadTimeout to set. + * @return This builder for chaining. */ public Builder setNetReadTimeout(int value) { + netReadTimeoutPresentCase_ = 3; netReadTimeoutPresent_ = value; onChanged(); @@ -3877,6 +4013,7 @@ public Builder setNetReadTimeout(int value) { * * * int32 net_read_timeout = 3; + * @return This builder for chaining. */ public Builder clearNetReadTimeout() { if (netReadTimeoutPresentCase_ == 3) { @@ -3893,6 +4030,18 @@ public Builder clearNetReadTimeout() { * * * int32 net_write_timeout = 4; + * @return Whether the netWriteTimeout field is set. + */ + public boolean hasNetWriteTimeout() { + return netWriteTimeoutPresentCase_ == 4; + } + /** + *
+       * in seconds
+       * 
+ * + * int32 net_write_timeout = 4; + * @return The netWriteTimeout. */ public int getNetWriteTimeout() { if (netWriteTimeoutPresentCase_ == 4) { @@ -3906,8 +4055,11 @@ public int getNetWriteTimeout() { * * * int32 net_write_timeout = 4; + * @param value The netWriteTimeout to set. + * @return This builder for chaining. */ public Builder setNetWriteTimeout(int value) { + netWriteTimeoutPresentCase_ = 4; netWriteTimeoutPresent_ = value; onChanged(); @@ -3919,6 +4071,7 @@ public Builder setNetWriteTimeout(int value) { * * * int32 net_write_timeout = 4; + * @return This builder for chaining. */ public Builder clearNetWriteTimeout() { if (netWriteTimeoutPresentCase_ == 4) { @@ -3932,6 +4085,7 @@ public Builder clearNetWriteTimeout() { private java.lang.Object destination_ = ""; /** * string destination = 5; + * @return The destination. */ public java.lang.String getDestination() { java.lang.Object ref = destination_; @@ -3947,6 +4101,7 @@ public java.lang.String getDestination() { } /** * string destination = 5; + * @return The bytes for destination. */ public com.google.protobuf.ByteString getDestinationBytes() { @@ -3963,37 +4118,38 @@ public java.lang.String getDestination() { } /** * string destination = 5; + * @param value The destination to set. + * @return This builder for chaining. */ public Builder setDestination( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } destination_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } /** * string destination = 5; + * @return This builder for chaining. */ public Builder clearDestination() { - destination_ = getDefaultInstance().getDestination(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * string destination = 5; + * @param value The bytes for destination to set. + * @return This builder for chaining. */ public Builder setDestinationBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); destination_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -4001,6 +4157,7 @@ public Builder setDestinationBytes( private java.lang.Object clientId_ = ""; /** * string client_id = 6; + * @return The clientId. */ public java.lang.String getClientId() { java.lang.Object ref = clientId_; @@ -4016,6 +4173,7 @@ public java.lang.String getClientId() { } /** * string client_id = 6; + * @return The bytes for clientId. */ public com.google.protobuf.ByteString getClientIdBytes() { @@ -4032,37 +4190,38 @@ public java.lang.String getClientId() { } /** * string client_id = 6; + * @param value The clientId to set. + * @return This builder for chaining. */ public Builder setClientId( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } clientId_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } /** * string client_id = 6; + * @return This builder for chaining. */ public Builder clearClientId() { - clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * string client_id = 6; + * @param value The bytes for clientId to set. + * @return This builder for chaining. */ public Builder setClientIdBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); clientId_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -4070,6 +4229,7 @@ public Builder setClientIdBytes( private java.lang.Object filter_ = ""; /** * string filter = 7; + * @return The filter. */ public java.lang.String getFilter() { java.lang.Object ref = filter_; @@ -4085,6 +4245,7 @@ public java.lang.String getFilter() { } /** * string filter = 7; + * @return The bytes for filter. */ public com.google.protobuf.ByteString getFilterBytes() { @@ -4101,37 +4262,38 @@ public java.lang.String getFilter() { } /** * string filter = 7; + * @param value The filter to set. + * @return This builder for chaining. */ public Builder setFilter( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } filter_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } /** * string filter = 7; + * @return This builder for chaining. */ public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** * string filter = 7; + * @param value The bytes for filter to set. + * @return This builder for chaining. */ public Builder setFilterBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); filter_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4139,40 +4301,34 @@ public Builder setFilterBytes( private long startTimestamp_ ; /** * int64 start_timestamp = 8; + * @return The startTimestamp. */ + @java.lang.Override public long getStartTimestamp() { return startTimestamp_; } /** * int64 start_timestamp = 8; + * @param value The startTimestamp to set. + * @return This builder for chaining. */ public Builder setStartTimestamp(long value) { - + startTimestamp_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } /** * int64 start_timestamp = 8; + * @return This builder for chaining. */ public Builder clearStartTimestamp() { - + bitField0_ = (bitField0_ & ~0x00000080); startTimestamp_ = 0L; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.ClientAuth) } @@ -4194,7 +4350,18 @@ public ClientAuth parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ClientAuth(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4220,6 +4387,12 @@ public interface AckOrBuilder extends /** * int32 error_code = 1; + * @return Whether the errorCode field is set. + */ + boolean hasErrorCode(); + /** + * int32 error_code = 1; + * @return The errorCode. */ int getErrorCode(); @@ -4229,6 +4402,7 @@ public interface AckOrBuilder extends * * * string error_message = 2; + * @return The errorMessage. */ java.lang.String getErrorMessage(); /** @@ -4237,89 +4411,45 @@ public interface AckOrBuilder extends * * * string error_message = 2; + * @return The bytes for errorMessage. */ com.google.protobuf.ByteString getErrorMessageBytes(); - public com.alibaba.otter.canal.protocol.CanalPacket.Ack.ErrorCodePresentCase getErrorCodePresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.Ack.ErrorCodePresentCase getErrorCodePresentCase(); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Ack} */ - public static final class Ack extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Ack extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Ack) AckOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Ack.class.getName()); + } // Use Ack.newBuilder() to construct. - private Ack(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Ack(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Ack() { errorMessage_ = ""; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Ack( - 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: { - errorCodePresentCase_ = 1; - errorCodePresent_ = input.readInt32(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - errorMessage_ = s; - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -4327,9 +4457,11 @@ private Ack( } private int errorCodePresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object errorCodePresent_; public enum ErrorCodePresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { ERROR_CODE(1), ERRORCODEPRESENT_NOT_SET(0); private final int value; @@ -4337,6 +4469,8 @@ private ErrorCodePresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -4365,7 +4499,17 @@ public int getNumber() { public static final int ERROR_CODE_FIELD_NUMBER = 1; /** * int32 error_code = 1; + * @return Whether the errorCode field is set. + */ + @java.lang.Override + public boolean hasErrorCode() { + return errorCodePresentCase_ == 1; + } + /** + * int32 error_code = 1; + * @return The errorCode. */ + @java.lang.Override public int getErrorCode() { if (errorCodePresentCase_ == 1) { return (java.lang.Integer) errorCodePresent_; @@ -4374,14 +4518,17 @@ public int getErrorCode() { } public static final int ERROR_MESSAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object errorMessage_; + @SuppressWarnings("serial") + private volatile java.lang.Object errorMessage_ = ""; /** *
      * if something like compression is not supported, erorr_message will tell about it.
      * 
* * string error_message = 2; + * @return The errorMessage. */ + @java.lang.Override public java.lang.String getErrorMessage() { java.lang.Object ref = errorMessage_; if (ref instanceof java.lang.String) { @@ -4400,7 +4547,9 @@ public java.lang.String getErrorMessage() { * * * string error_message = 2; + * @return The bytes for errorMessage. */ + @java.lang.Override public com.google.protobuf.ByteString getErrorMessageBytes() { java.lang.Object ref = errorMessage_; @@ -4433,10 +4582,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt32( 1, (int)((java.lang.Integer) errorCodePresent_)); } - if (!getErrorMessageBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, errorMessage_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4450,10 +4599,10 @@ public int getSerializedSize() { .computeInt32Size( 1, (int)((java.lang.Integer) errorCodePresent_)); } - if (!getErrorMessageBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, errorMessage_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4468,22 +4617,19 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.Ack other = (com.alibaba.otter.canal.protocol.CanalPacket.Ack) obj; - boolean result = true; - result = result && getErrorMessage() - .equals(other.getErrorMessage()); - result = result && getErrorCodePresentCase().equals( - other.getErrorCodePresentCase()); - if (!result) return false; + if (!getErrorMessage() + .equals(other.getErrorMessage())) return false; + if (!getErrorCodePresentCase().equals(other.getErrorCodePresentCase())) return false; switch (errorCodePresentCase_) { case 1: - result = result && (getErrorCode() - == other.getErrorCode()); + if (getErrorCode() + != other.getErrorCode()) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -4503,7 +4649,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4542,39 +4688,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -4594,7 +4742,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -4602,7 +4750,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.Ack} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Ack) com.alibaba.otter.canal.protocol.CanalPacket.AckOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -4611,7 +4759,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -4620,24 +4768,19 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Ack.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; errorMessage_ = ""; - errorCodePresentCase_ = 0; errorCodePresent_ = null; return this; @@ -4666,47 +4809,24 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Ack build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Ack buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.Ack result = new com.alibaba.otter.canal.protocol.CanalPacket.Ack(this); - if (errorCodePresentCase_ == 1) { - result.errorCodePresent_ = errorCodePresent_; - } - result.errorMessage_ = errorMessage_; - result.errorCodePresentCase_ = errorCodePresentCase_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.Ack result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.errorMessage_ = errorMessage_; + } } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalPacket.Ack result) { + result.errorCodePresentCase_ = errorCodePresentCase_; + result.errorCodePresent_ = this.errorCodePresent_; } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Ack) { @@ -4721,6 +4841,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Ack other) if (other == com.alibaba.otter.canal.protocol.CanalPacket.Ack.getDefaultInstance()) return this; if (!other.getErrorMessage().isEmpty()) { errorMessage_ = other.errorMessage_; + bitField0_ |= 0x00000002; onChanged(); } switch (other.getErrorCodePresentCase()) { @@ -4732,7 +4853,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Ack other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4747,17 +4868,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.Ack parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + errorCodePresent_ = input.readInt32(); + errorCodePresentCase_ = 1; + break; + } // case 8 + case 18: { + errorMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Ack) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int errorCodePresentCase_ = 0; @@ -4775,11 +4919,20 @@ public Builder clearErrorCodePresent() { return this; } + private int bitField0_; /** * int32 error_code = 1; + * @return Whether the errorCode field is set. */ - public int getErrorCode() { + public boolean hasErrorCode() { + return errorCodePresentCase_ == 1; + } + /** + * int32 error_code = 1; + * @return The errorCode. + */ + public int getErrorCode() { if (errorCodePresentCase_ == 1) { return (java.lang.Integer) errorCodePresent_; } @@ -4787,8 +4940,11 @@ public int getErrorCode() { } /** * int32 error_code = 1; + * @param value The errorCode to set. + * @return This builder for chaining. */ public Builder setErrorCode(int value) { + errorCodePresentCase_ = 1; errorCodePresent_ = value; onChanged(); @@ -4796,6 +4952,7 @@ public Builder setErrorCode(int value) { } /** * int32 error_code = 1; + * @return This builder for chaining. */ public Builder clearErrorCode() { if (errorCodePresentCase_ == 1) { @@ -4813,6 +4970,7 @@ public Builder clearErrorCode() { * * * string error_message = 2; + * @return The errorMessage. */ public java.lang.String getErrorMessage() { java.lang.Object ref = errorMessage_; @@ -4832,6 +4990,7 @@ public java.lang.String getErrorMessage() { * * * string error_message = 2; + * @return The bytes for errorMessage. */ public com.google.protobuf.ByteString getErrorMessageBytes() { @@ -4852,14 +5011,14 @@ public java.lang.String getErrorMessage() { * * * string error_message = 2; + * @param value The errorMessage to set. + * @return This builder for chaining. */ public Builder setErrorMessage( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } errorMessage_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -4869,10 +5028,11 @@ public Builder setErrorMessage( * * * string error_message = 2; + * @return This builder for chaining. */ public Builder clearErrorMessage() { - errorMessage_ = getDefaultInstance().getErrorMessage(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -4882,30 +5042,18 @@ public Builder clearErrorMessage() { * * * string error_message = 2; + * @param value The bytes for errorMessage to set. + * @return This builder for chaining. */ public Builder setErrorMessageBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); errorMessage_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Ack) } @@ -4927,7 +5075,18 @@ public Ack parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Ack(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4953,114 +5112,67 @@ public interface ClientAckOrBuilder extends /** * string destination = 1; + * @return The destination. */ java.lang.String getDestination(); /** * string destination = 1; + * @return The bytes for destination. */ com.google.protobuf.ByteString getDestinationBytes(); /** * string client_id = 2; + * @return The clientId. */ java.lang.String getClientId(); /** * string client_id = 2; + * @return The bytes for clientId. */ com.google.protobuf.ByteString getClientIdBytes(); /** * int64 batch_id = 3; + * @return The batchId. */ long getBatchId(); } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAck} */ - public static final class ClientAck extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class ClientAck extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ClientAck) ClientAckOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + ClientAck.class.getName()); + } // Use ClientAck.newBuilder() to construct. - private ClientAck(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private ClientAck(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private ClientAck() { destination_ = ""; clientId_ = ""; - batchId_ = 0L; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ClientAck( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - - destination_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - clientId_ = s; - break; - } - case 24: { - - batchId_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -5068,10 +5180,13 @@ private ClientAck( } public static final int DESTINATION_FIELD_NUMBER = 1; - private volatile java.lang.Object destination_; + @SuppressWarnings("serial") + private volatile java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ + @java.lang.Override public java.lang.String getDestination() { java.lang.Object ref = destination_; if (ref instanceof java.lang.String) { @@ -5086,7 +5201,9 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ + @java.lang.Override public com.google.protobuf.ByteString getDestinationBytes() { java.lang.Object ref = destination_; @@ -5102,10 +5219,13 @@ public java.lang.String getDestination() { } public static final int CLIENT_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object clientId_; + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; /** * string client_id = 2; + * @return The clientId. */ + @java.lang.Override public java.lang.String getClientId() { java.lang.Object ref = clientId_; if (ref instanceof java.lang.String) { @@ -5120,7 +5240,9 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @return The bytes for clientId. */ + @java.lang.Override public com.google.protobuf.ByteString getClientIdBytes() { java.lang.Object ref = clientId_; @@ -5136,10 +5258,12 @@ public java.lang.String getClientId() { } public static final int BATCH_ID_FIELD_NUMBER = 3; - private long batchId_; + private long batchId_ = 0L; /** * int64 batch_id = 3; + * @return The batchId. */ + @java.lang.Override public long getBatchId() { return batchId_; } @@ -5158,16 +5282,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDestinationBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, destination_); } - if (!getClientIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, clientId_); } if (batchId_ != 0L) { output.writeInt64(3, batchId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5176,17 +5300,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getDestinationBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, destination_); } - if (!getClientIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clientId_); } if (batchId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, batchId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5201,15 +5325,14 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.ClientAck other = (com.alibaba.otter.canal.protocol.CanalPacket.ClientAck) obj; - boolean result = true; - result = result && getDestination() - .equals(other.getDestination()); - result = result && getClientId() - .equals(other.getClientId()); - result = result && (getBatchId() - == other.getBatchId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getDestination() + .equals(other.getDestination())) return false; + if (!getClientId() + .equals(other.getClientId())) return false; + if (getBatchId() + != other.getBatchId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -5226,7 +5349,7 @@ public int hashCode() { hash = (37 * hash) + BATCH_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getBatchId()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5265,39 +5388,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -5317,7 +5442,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -5325,7 +5450,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAck} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.ClientAck) com.alibaba.otter.canal.protocol.CanalPacket.ClientAckOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -5334,7 +5459,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -5343,28 +5468,21 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; destination_ = ""; - clientId_ = ""; - batchId_ = 0L; - return this; } @@ -5391,45 +5509,24 @@ public com.alibaba.otter.canal.protocol.CanalPacket.ClientAck build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.ClientAck buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.ClientAck result = new com.alibaba.otter.canal.protocol.CanalPacket.ClientAck(this); - result.destination_ = destination_; - result.clientId_ = clientId_; - result.batchId_ = batchId_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.ClientAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.destination_ = destination_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.batchId_ = batchId_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.ClientAck) { @@ -5444,16 +5541,18 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.ClientAck if (other == com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.getDefaultInstance()) return this; if (!other.getDestination().isEmpty()) { destination_ = other.destination_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getClientId().isEmpty()) { clientId_ = other.clientId_; + bitField0_ |= 0x00000002; onChanged(); } if (other.getBatchId() != 0L) { setBatchId(other.getBatchId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5468,23 +5567,53 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + destination_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + batchId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.ClientAck) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ public java.lang.String getDestination() { java.lang.Object ref = destination_; @@ -5500,6 +5629,7 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ public com.google.protobuf.ByteString getDestinationBytes() { @@ -5516,37 +5646,38 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @param value The destination to set. + * @return This builder for chaining. */ public Builder setDestination( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** * string destination = 1; + * @return This builder for chaining. */ public Builder clearDestination() { - destination_ = getDefaultInstance().getDestination(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string destination = 1; + * @param value The bytes for destination to set. + * @return This builder for chaining. */ public Builder setDestinationBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -5554,6 +5685,7 @@ public Builder setDestinationBytes( private java.lang.Object clientId_ = ""; /** * string client_id = 2; + * @return The clientId. */ public java.lang.String getClientId() { java.lang.Object ref = clientId_; @@ -5569,6 +5701,7 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @return The bytes for clientId. */ public com.google.protobuf.ByteString getClientIdBytes() { @@ -5585,37 +5718,38 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @param value The clientId to set. + * @return This builder for chaining. */ public Builder setClientId( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } clientId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** * string client_id = 2; + * @return This builder for chaining. */ public Builder clearClientId() { - clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * string client_id = 2; + * @param value The bytes for clientId to set. + * @return This builder for chaining. */ public Builder setClientIdBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); clientId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -5623,40 +5757,34 @@ public Builder setClientIdBytes( private long batchId_ ; /** * int64 batch_id = 3; + * @return The batchId. */ + @java.lang.Override public long getBatchId() { return batchId_; } /** * int64 batch_id = 3; + * @param value The batchId to set. + * @return This builder for chaining. */ public Builder setBatchId(long value) { - + batchId_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** * int64 batch_id = 3; + * @return This builder for chaining. */ public Builder clearBatchId() { - + bitField0_ = (bitField0_ & ~0x00000004); batchId_ = 0L; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.ClientAck) } @@ -5678,7 +5806,18 @@ public ClientAck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ClientAck(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5704,30 +5843,36 @@ public interface SubOrBuilder extends /** * string destination = 1; + * @return The destination. */ java.lang.String getDestination(); /** * string destination = 1; + * @return The bytes for destination. */ com.google.protobuf.ByteString getDestinationBytes(); /** * string client_id = 2; + * @return The clientId. */ java.lang.String getClientId(); /** * string client_id = 2; + * @return The bytes for clientId. */ com.google.protobuf.ByteString getClientIdBytes(); /** * string filter = 7; + * @return The filter. */ java.lang.String getFilter(); /** * string filter = 7; + * @return The bytes for filter. */ com.google.protobuf.ByteString getFilterBytes(); @@ -5739,13 +5884,22 @@ public interface SubOrBuilder extends * * Protobuf type {@code com.alibaba.otter.canal.protocol.Sub} */ - public static final class Sub extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Sub extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Sub) SubOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Sub.class.getName()); + } // Use Sub.newBuilder() to construct. - private Sub(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Sub(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Sub() { @@ -5754,74 +5908,13 @@ private Sub() { filter_ = ""; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Sub( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - - destination_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - clientId_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -5829,10 +5922,13 @@ private Sub( } public static final int DESTINATION_FIELD_NUMBER = 1; - private volatile java.lang.Object destination_; + @SuppressWarnings("serial") + private volatile java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ + @java.lang.Override public java.lang.String getDestination() { java.lang.Object ref = destination_; if (ref instanceof java.lang.String) { @@ -5847,7 +5943,9 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ + @java.lang.Override public com.google.protobuf.ByteString getDestinationBytes() { java.lang.Object ref = destination_; @@ -5863,10 +5961,13 @@ public java.lang.String getDestination() { } public static final int CLIENT_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object clientId_; + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; /** * string client_id = 2; + * @return The clientId. */ + @java.lang.Override public java.lang.String getClientId() { java.lang.Object ref = clientId_; if (ref instanceof java.lang.String) { @@ -5881,7 +5982,9 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @return The bytes for clientId. */ + @java.lang.Override public com.google.protobuf.ByteString getClientIdBytes() { java.lang.Object ref = clientId_; @@ -5897,10 +6000,13 @@ public java.lang.String getClientId() { } public static final int FILTER_FIELD_NUMBER = 7; - private volatile java.lang.Object filter_; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; /** * string filter = 7; + * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -5915,7 +6021,9 @@ public java.lang.String getFilter() { } /** * string filter = 7; + * @return The bytes for filter. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; @@ -5944,16 +6052,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDestinationBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, destination_); } - if (!getClientIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, clientId_); } - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5962,16 +6070,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getDestinationBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, destination_); } - if (!getClientIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clientId_); } - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5986,15 +6094,14 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.Sub other = (com.alibaba.otter.canal.protocol.CanalPacket.Sub) obj; - boolean result = true; - result = result && getDestination() - .equals(other.getDestination()); - result = result && getClientId() - .equals(other.getClientId()); - result = result && getFilter() - .equals(other.getFilter()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getDestination() + .equals(other.getDestination())) return false; + if (!getClientId() + .equals(other.getClientId())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -6010,7 +6117,7 @@ public int hashCode() { hash = (53 * hash) + getClientId().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6049,39 +6156,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -6101,7 +6210,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -6113,7 +6222,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.Sub} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Sub) com.alibaba.otter.canal.protocol.CanalPacket.SubOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -6122,7 +6231,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -6131,28 +6240,21 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Sub.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; destination_ = ""; - clientId_ = ""; - filter_ = ""; - return this; } @@ -6179,45 +6281,24 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Sub build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Sub buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.Sub result = new com.alibaba.otter.canal.protocol.CanalPacket.Sub(this); - result.destination_ = destination_; - result.clientId_ = clientId_; - result.filter_ = filter_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.Sub result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.destination_ = destination_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.filter_ = filter_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Sub) { @@ -6232,17 +6313,20 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Sub other) if (other == com.alibaba.otter.canal.protocol.CanalPacket.Sub.getDefaultInstance()) return this; if (!other.getDestination().isEmpty()) { destination_ = other.destination_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getClientId().isEmpty()) { clientId_ = other.clientId_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getFilter().isEmpty()) { filter_ = other.filter_; + bitField0_ |= 0x00000004; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6257,23 +6341,53 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.Sub parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + destination_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 58: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Sub) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ public java.lang.String getDestination() { java.lang.Object ref = destination_; @@ -6289,6 +6403,7 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ public com.google.protobuf.ByteString getDestinationBytes() { @@ -6305,37 +6420,38 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @param value The destination to set. + * @return This builder for chaining. */ public Builder setDestination( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** * string destination = 1; + * @return This builder for chaining. */ public Builder clearDestination() { - destination_ = getDefaultInstance().getDestination(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string destination = 1; + * @param value The bytes for destination to set. + * @return This builder for chaining. */ public Builder setDestinationBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -6343,6 +6459,7 @@ public Builder setDestinationBytes( private java.lang.Object clientId_ = ""; /** * string client_id = 2; + * @return The clientId. */ public java.lang.String getClientId() { java.lang.Object ref = clientId_; @@ -6358,6 +6475,7 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @return The bytes for clientId. */ public com.google.protobuf.ByteString getClientIdBytes() { @@ -6374,37 +6492,38 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @param value The clientId to set. + * @return This builder for chaining. */ public Builder setClientId( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } clientId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** * string client_id = 2; + * @return This builder for chaining. */ public Builder clearClientId() { - clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * string client_id = 2; + * @param value The bytes for clientId to set. + * @return This builder for chaining. */ public Builder setClientIdBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); clientId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -6412,6 +6531,7 @@ public Builder setClientIdBytes( private java.lang.Object filter_ = ""; /** * string filter = 7; + * @return The filter. */ public java.lang.String getFilter() { java.lang.Object ref = filter_; @@ -6427,6 +6547,7 @@ public java.lang.String getFilter() { } /** * string filter = 7; + * @return The bytes for filter. */ public com.google.protobuf.ByteString getFilterBytes() { @@ -6443,52 +6564,41 @@ public java.lang.String getFilter() { } /** * string filter = 7; + * @param value The filter to set. + * @return This builder for chaining. */ public Builder setFilter( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } filter_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** * string filter = 7; + * @return This builder for chaining. */ public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * string filter = 7; + * @param value The bytes for filter to set. + * @return This builder for chaining. */ public Builder setFilterBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); filter_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Sub) } @@ -6510,7 +6620,18 @@ public Sub parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Sub(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6536,30 +6657,36 @@ public interface UnsubOrBuilder extends /** * string destination = 1; + * @return The destination. */ java.lang.String getDestination(); /** * string destination = 1; + * @return The bytes for destination. */ com.google.protobuf.ByteString getDestinationBytes(); /** * string client_id = 2; + * @return The clientId. */ java.lang.String getClientId(); /** * string client_id = 2; + * @return The bytes for clientId. */ com.google.protobuf.ByteString getClientIdBytes(); /** * string filter = 7; + * @return The filter. */ java.lang.String getFilter(); /** * string filter = 7; + * @return The bytes for filter. */ com.google.protobuf.ByteString getFilterBytes(); @@ -6571,13 +6698,22 @@ public interface UnsubOrBuilder extends * * Protobuf type {@code com.alibaba.otter.canal.protocol.Unsub} */ - public static final class Unsub extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Unsub extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Unsub) UnsubOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Unsub.class.getName()); + } // Use Unsub.newBuilder() to construct. - private Unsub(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Unsub(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Unsub() { @@ -6586,74 +6722,13 @@ private Unsub() { filter_ = ""; } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Unsub( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - - destination_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - clientId_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -6661,10 +6736,13 @@ private Unsub( } public static final int DESTINATION_FIELD_NUMBER = 1; - private volatile java.lang.Object destination_; + @SuppressWarnings("serial") + private volatile java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ + @java.lang.Override public java.lang.String getDestination() { java.lang.Object ref = destination_; if (ref instanceof java.lang.String) { @@ -6679,7 +6757,9 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ + @java.lang.Override public com.google.protobuf.ByteString getDestinationBytes() { java.lang.Object ref = destination_; @@ -6695,10 +6775,13 @@ public java.lang.String getDestination() { } public static final int CLIENT_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object clientId_; + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; /** * string client_id = 2; + * @return The clientId. */ + @java.lang.Override public java.lang.String getClientId() { java.lang.Object ref = clientId_; if (ref instanceof java.lang.String) { @@ -6713,7 +6796,9 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @return The bytes for clientId. */ + @java.lang.Override public com.google.protobuf.ByteString getClientIdBytes() { java.lang.Object ref = clientId_; @@ -6729,10 +6814,13 @@ public java.lang.String getClientId() { } public static final int FILTER_FIELD_NUMBER = 7; - private volatile java.lang.Object filter_; + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; /** * string filter = 7; + * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -6747,7 +6835,9 @@ public java.lang.String getFilter() { } /** * string filter = 7; + * @return The bytes for filter. */ + @java.lang.Override public com.google.protobuf.ByteString getFilterBytes() { java.lang.Object ref = filter_; @@ -6776,16 +6866,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDestinationBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, destination_); } - if (!getClientIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, clientId_); } - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6794,16 +6884,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getDestinationBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, destination_); } - if (!getClientIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clientId_); } - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, filter_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6818,15 +6908,14 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.Unsub other = (com.alibaba.otter.canal.protocol.CanalPacket.Unsub) obj; - boolean result = true; - result = result && getDestination() - .equals(other.getDestination()); - result = result && getClientId() - .equals(other.getClientId()); - result = result && getFilter() - .equals(other.getFilter()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getDestination() + .equals(other.getDestination())) return false; + if (!getClientId() + .equals(other.getClientId())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -6842,7 +6931,7 @@ public int hashCode() { hash = (53 * hash) + getClientId().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6881,39 +6970,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -6933,7 +7024,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -6945,7 +7036,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.Unsub} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Unsub) com.alibaba.otter.canal.protocol.CanalPacket.UnsubOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -6954,7 +7045,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -6963,28 +7054,21 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Unsub.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; destination_ = ""; - clientId_ = ""; - filter_ = ""; - return this; } @@ -7011,45 +7095,24 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Unsub build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Unsub buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.Unsub result = new com.alibaba.otter.canal.protocol.CanalPacket.Unsub(this); - result.destination_ = destination_; - result.clientId_ = clientId_; - result.filter_ = filter_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.Unsub result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.destination_ = destination_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.filter_ = filter_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Unsub) { @@ -7064,17 +7127,20 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Unsub othe if (other == com.alibaba.otter.canal.protocol.CanalPacket.Unsub.getDefaultInstance()) return this; if (!other.getDestination().isEmpty()) { destination_ = other.destination_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getClientId().isEmpty()) { clientId_ = other.clientId_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getFilter().isEmpty()) { filter_ = other.filter_; + bitField0_ |= 0x00000004; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7089,23 +7155,53 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.Unsub parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + destination_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 58: { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Unsub) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ public java.lang.String getDestination() { java.lang.Object ref = destination_; @@ -7121,6 +7217,7 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ public com.google.protobuf.ByteString getDestinationBytes() { @@ -7137,37 +7234,38 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @param value The destination to set. + * @return This builder for chaining. */ public Builder setDestination( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** * string destination = 1; + * @return This builder for chaining. */ public Builder clearDestination() { - destination_ = getDefaultInstance().getDestination(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string destination = 1; + * @param value The bytes for destination to set. + * @return This builder for chaining. */ public Builder setDestinationBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -7175,6 +7273,7 @@ public Builder setDestinationBytes( private java.lang.Object clientId_ = ""; /** * string client_id = 2; + * @return The clientId. */ public java.lang.String getClientId() { java.lang.Object ref = clientId_; @@ -7190,6 +7289,7 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @return The bytes for clientId. */ public com.google.protobuf.ByteString getClientIdBytes() { @@ -7206,37 +7306,38 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @param value The clientId to set. + * @return This builder for chaining. */ public Builder setClientId( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } clientId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** * string client_id = 2; + * @return This builder for chaining. */ public Builder clearClientId() { - clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * string client_id = 2; + * @param value The bytes for clientId to set. + * @return This builder for chaining. */ public Builder setClientIdBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); clientId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -7244,6 +7345,7 @@ public Builder setClientIdBytes( private java.lang.Object filter_ = ""; /** * string filter = 7; + * @return The filter. */ public java.lang.String getFilter() { java.lang.Object ref = filter_; @@ -7259,6 +7361,7 @@ public java.lang.String getFilter() { } /** * string filter = 7; + * @return The bytes for filter. */ public com.google.protobuf.ByteString getFilterBytes() { @@ -7275,52 +7378,41 @@ public java.lang.String getFilter() { } /** * string filter = 7; + * @param value The filter to set. + * @return This builder for chaining. */ public Builder setFilter( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } filter_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** * string filter = 7; + * @return This builder for chaining. */ public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * string filter = 7; + * @param value The bytes for filter to set. + * @return This builder for chaining. */ public Builder setFilterBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); filter_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Unsub) } @@ -7342,7 +7434,18 @@ public Unsub parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Unsub(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7368,26 +7471,31 @@ public interface GetOrBuilder extends /** * string destination = 1; + * @return The destination. */ java.lang.String getDestination(); /** * string destination = 1; + * @return The bytes for destination. */ com.google.protobuf.ByteString getDestinationBytes(); /** * string client_id = 2; + * @return The clientId. */ java.lang.String getClientId(); /** * string client_id = 2; + * @return The bytes for clientId. */ com.google.protobuf.ByteString getClientIdBytes(); /** * int32 fetch_size = 3; + * @return The fetchSize. */ int getFetchSize(); @@ -7397,15 +7505,35 @@ public interface GetOrBuilder extends * * * int64 timeout = 4; + * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + /** + *
+     * 默认-1时代表不控制
+     * 
+ * + * int64 timeout = 4; + * @return The timeout. */ long getTimeout(); /** *
-     * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+     * 数字类型,0:纳秒,1:微秒,2:毫秒,3:秒,4:分钟,5:小时,6:天
+     * 
+ * + * int32 unit = 5; + * @return Whether the unit field is set. + */ + boolean hasUnit(); + /** + *
+     * 数字类型,0:纳秒,1:微秒,2:毫秒,3:秒,4:分钟,5:小时,6:天
      * 
* * int32 unit = 5; + * @return The unit. */ int getUnit(); @@ -7415,119 +7543,62 @@ public interface GetOrBuilder extends * * * bool auto_ack = 6; + * @return Whether the autoAck field is set. + */ + boolean hasAutoAck(); + /** + *
+     * 是否自动ack
+     * 
+ * + * bool auto_ack = 6; + * @return The autoAck. */ boolean getAutoAck(); - public com.alibaba.otter.canal.protocol.CanalPacket.Get.TimeoutPresentCase getTimeoutPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.Get.TimeoutPresentCase getTimeoutPresentCase(); - public com.alibaba.otter.canal.protocol.CanalPacket.Get.UnitPresentCase getUnitPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.Get.UnitPresentCase getUnitPresentCase(); - public com.alibaba.otter.canal.protocol.CanalPacket.Get.AutoAckPresentCase getAutoAckPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.Get.AutoAckPresentCase getAutoAckPresentCase(); } /** *
-   *  PullRequest
+   * PullRequest
    * 
* * Protobuf type {@code com.alibaba.otter.canal.protocol.Get} */ - public static final class Get extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Get extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Get) GetOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Get.class.getName()); + } // Use Get.newBuilder() to construct. - private Get(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Get(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Get() { destination_ = ""; clientId_ = ""; - fetchSize_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; } - private Get( - 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: { - java.lang.String s = input.readStringRequireUtf8(); - - destination_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - clientId_ = s; - break; - } - case 24: { - fetchSize_ = input.readInt32(); - break; - } - case 32: { - timeoutPresentCase_ = 4; - timeoutPresent_ = input.readInt64(); - break; - } - case 40: { - unitPresentCase_ = 5; - unitPresent_ = input.readInt32(); - break; - } - case 48: { - autoAckPresentCase_ = 6; - autoAckPresent_ = input.readBool(); - break; - } - default: { - if (!parseUnknownFieldProto3( - 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -7535,9 +7606,11 @@ private Get( } private int timeoutPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object timeoutPresent_; public enum TimeoutPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { TIMEOUT(4), TIMEOUTPRESENT_NOT_SET(0); private final int value; @@ -7545,6 +7618,8 @@ private TimeoutPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -7571,9 +7646,11 @@ public int getNumber() { } private int unitPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object unitPresent_; public enum UnitPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { UNIT(5), UNITPRESENT_NOT_SET(0); private final int value; @@ -7581,6 +7658,8 @@ private UnitPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -7607,9 +7686,11 @@ public int getNumber() { } private int autoAckPresentCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object autoAckPresent_; public enum AutoAckPresentCase - implements com.google.protobuf.Internal.EnumLite { + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { AUTO_ACK(6), AUTOACKPRESENT_NOT_SET(0); private final int value; @@ -7617,6 +7698,8 @@ private AutoAckPresentCase(int value) { this.value = value; } /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated @@ -7643,10 +7726,13 @@ public int getNumber() { } public static final int DESTINATION_FIELD_NUMBER = 1; - private volatile java.lang.Object destination_; + @SuppressWarnings("serial") + private volatile java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ + @java.lang.Override public java.lang.String getDestination() { java.lang.Object ref = destination_; if (ref instanceof java.lang.String) { @@ -7661,7 +7747,9 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ + @java.lang.Override public com.google.protobuf.ByteString getDestinationBytes() { java.lang.Object ref = destination_; @@ -7677,10 +7765,13 @@ public java.lang.String getDestination() { } public static final int CLIENT_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object clientId_; + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; /** * string client_id = 2; + * @return The clientId. */ + @java.lang.Override public java.lang.String getClientId() { java.lang.Object ref = clientId_; if (ref instanceof java.lang.String) { @@ -7695,7 +7786,9 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @return The bytes for clientId. */ + @java.lang.Override public com.google.protobuf.ByteString getClientIdBytes() { java.lang.Object ref = clientId_; @@ -7711,10 +7804,12 @@ public java.lang.String getClientId() { } public static final int FETCH_SIZE_FIELD_NUMBER = 3; - private int fetchSize_; + private int fetchSize_ = 0; /** * int32 fetch_size = 3; + * @return The fetchSize. */ + @java.lang.Override public int getFetchSize() { return fetchSize_; } @@ -7726,7 +7821,21 @@ public int getFetchSize() { * * * int64 timeout = 4; + * @return Whether the timeout field is set. */ + @java.lang.Override + public boolean hasTimeout() { + return timeoutPresentCase_ == 4; + } + /** + *
+     * 默认-1时代表不控制
+     * 
+ * + * int64 timeout = 4; + * @return The timeout. + */ + @java.lang.Override public long getTimeout() { if (timeoutPresentCase_ == 4) { return (java.lang.Long) timeoutPresent_; @@ -7737,11 +7846,25 @@ public long getTimeout() { public static final int UNIT_FIELD_NUMBER = 5; /** *
-     * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+     * 数字类型,0:纳秒,1:微秒,2:毫秒,3:秒,4:分钟,5:小时,6:天
+     * 
+ * + * int32 unit = 5; + * @return Whether the unit field is set. + */ + @java.lang.Override + public boolean hasUnit() { + return unitPresentCase_ == 5; + } + /** + *
+     * 数字类型,0:纳秒,1:微秒,2:毫秒,3:秒,4:分钟,5:小时,6:天
      * 
* * int32 unit = 5; + * @return The unit. */ + @java.lang.Override public int getUnit() { if (unitPresentCase_ == 5) { return (java.lang.Integer) unitPresent_; @@ -7756,7 +7879,21 @@ public int getUnit() { * * * bool auto_ack = 6; + * @return Whether the autoAck field is set. + */ + @java.lang.Override + public boolean hasAutoAck() { + return autoAckPresentCase_ == 6; + } + /** + *
+     * 是否自动ack
+     * 
+ * + * bool auto_ack = 6; + * @return The autoAck. */ + @java.lang.Override public boolean getAutoAck() { if (autoAckPresentCase_ == 6) { return (java.lang.Boolean) autoAckPresent_; @@ -7778,11 +7915,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDestinationBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, destination_); } - if (!getClientIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, clientId_); } if (fetchSize_ != 0) { output.writeInt32(3, fetchSize_); @@ -7799,7 +7936,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBool( 6, (boolean)((java.lang.Boolean) autoAckPresent_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7808,11 +7945,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getDestinationBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, destination_); } - if (!getClientIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clientId_); } if (fetchSize_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -7833,7 +7970,7 @@ public int getSerializedSize() { .computeBoolSize( 6, (boolean)((java.lang.Boolean) autoAckPresent_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7848,48 +7985,41 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.Get other = (com.alibaba.otter.canal.protocol.CanalPacket.Get) obj; - boolean result = true; - result = result && getDestination() - .equals(other.getDestination()); - result = result && getClientId() - .equals(other.getClientId()); - result = result && (getFetchSize() - == other.getFetchSize()); - result = result && getTimeoutPresentCase().equals( - other.getTimeoutPresentCase()); - if (!result) return false; + if (!getDestination() + .equals(other.getDestination())) return false; + if (!getClientId() + .equals(other.getClientId())) return false; + if (getFetchSize() + != other.getFetchSize()) return false; + if (!getTimeoutPresentCase().equals(other.getTimeoutPresentCase())) return false; switch (timeoutPresentCase_) { case 4: - result = result && (getTimeout() - == other.getTimeout()); + if (getTimeout() + != other.getTimeout()) return false; break; case 0: default: } - result = result && getUnitPresentCase().equals( - other.getUnitPresentCase()); - if (!result) return false; + if (!getUnitPresentCase().equals(other.getUnitPresentCase())) return false; switch (unitPresentCase_) { case 5: - result = result && (getUnit() - == other.getUnit()); + if (getUnit() + != other.getUnit()) return false; break; case 0: default: } - result = result && getAutoAckPresentCase().equals( - other.getAutoAckPresentCase()); - if (!result) return false; + if (!getAutoAckPresentCase().equals(other.getAutoAckPresentCase())) return false; switch (autoAckPresentCase_) { case 6: - result = result && (getAutoAck() - == other.getAutoAck()); + if (getAutoAck() + != other.getAutoAck()) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -7931,7 +8061,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7970,39 +8100,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -8022,19 +8154,19 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
-     *  PullRequest
+     * PullRequest
      * 
* * Protobuf type {@code com.alibaba.otter.canal.protocol.Get} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Get) com.alibaba.otter.canal.protocol.CanalPacket.GetOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -8043,7 +8175,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -8052,28 +8184,21 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Get.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; destination_ = ""; - clientId_ = ""; - fetchSize_ = 0; - timeoutPresentCase_ = 0; timeoutPresent_ = null; unitPresentCase_ = 0; @@ -8106,57 +8231,34 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Get build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Get buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.Get result = new com.alibaba.otter.canal.protocol.CanalPacket.Get(this); - result.destination_ = destination_; - result.clientId_ = clientId_; - result.fetchSize_ = fetchSize_; - if (timeoutPresentCase_ == 4) { - result.timeoutPresent_ = timeoutPresent_; + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.Get result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.destination_ = destination_; } - if (unitPresentCase_ == 5) { - result.unitPresent_ = unitPresent_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientId_ = clientId_; } - if (autoAckPresentCase_ == 6) { - result.autoAckPresent_ = autoAckPresent_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fetchSize_ = fetchSize_; } + } + + private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalPacket.Get result) { result.timeoutPresentCase_ = timeoutPresentCase_; + result.timeoutPresent_ = this.timeoutPresent_; result.unitPresentCase_ = unitPresentCase_; + result.unitPresent_ = this.unitPresent_; result.autoAckPresentCase_ = autoAckPresentCase_; - onBuilt(); - return result; + result.autoAckPresent_ = this.autoAckPresent_; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Get) { @@ -8171,10 +8273,12 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Get other) if (other == com.alibaba.otter.canal.protocol.CanalPacket.Get.getDefaultInstance()) return this; if (!other.getDestination().isEmpty()) { destination_ = other.destination_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getClientId().isEmpty()) { clientId_ = other.clientId_; + bitField0_ |= 0x00000002; onChanged(); } if (other.getFetchSize() != 0) { @@ -8207,7 +8311,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Get other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8222,17 +8326,60 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.Get parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + destination_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + fetchSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + timeoutPresent_ = input.readInt64(); + timeoutPresentCase_ = 4; + break; + } // case 32 + case 40: { + unitPresent_ = input.readInt32(); + unitPresentCase_ = 5; + break; + } // case 40 + case 48: { + autoAckPresent_ = input.readBool(); + autoAckPresentCase_ = 6; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Get) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int timeoutPresentCase_ = 0; @@ -8280,10 +8427,12 @@ public Builder clearAutoAckPresent() { return this; } + private int bitField0_; private java.lang.Object destination_ = ""; /** * string destination = 1; + * @return The destination. */ public java.lang.String getDestination() { java.lang.Object ref = destination_; @@ -8299,6 +8448,7 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @return The bytes for destination. */ public com.google.protobuf.ByteString getDestinationBytes() { @@ -8315,37 +8465,38 @@ public java.lang.String getDestination() { } /** * string destination = 1; + * @param value The destination to set. + * @return This builder for chaining. */ public Builder setDestination( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** * string destination = 1; + * @return This builder for chaining. */ public Builder clearDestination() { - destination_ = getDefaultInstance().getDestination(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string destination = 1; + * @param value The bytes for destination to set. + * @return This builder for chaining. */ public Builder setDestinationBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); destination_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -8353,6 +8504,7 @@ public Builder setDestinationBytes( private java.lang.Object clientId_ = ""; /** * string client_id = 2; + * @return The clientId. */ public java.lang.String getClientId() { java.lang.Object ref = clientId_; @@ -8368,6 +8520,7 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @return The bytes for clientId. */ public com.google.protobuf.ByteString getClientIdBytes() { @@ -8384,37 +8537,38 @@ public java.lang.String getClientId() { } /** * string client_id = 2; + * @param value The clientId to set. + * @return This builder for chaining. */ public Builder setClientId( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } clientId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** * string client_id = 2; + * @return This builder for chaining. */ public Builder clearClientId() { - clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * string client_id = 2; + * @param value The bytes for clientId to set. + * @return This builder for chaining. */ public Builder setClientIdBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); clientId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -8422,35 +8576,53 @@ public Builder setClientIdBytes( private int fetchSize_ ; /** * int32 fetch_size = 3; + * @return The fetchSize. */ + @java.lang.Override public int getFetchSize() { return fetchSize_; } /** * int32 fetch_size = 3; + * @param value The fetchSize to set. + * @return This builder for chaining. */ public Builder setFetchSize(int value) { - + fetchSize_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** * int32 fetch_size = 3; + * @return This builder for chaining. */ public Builder clearFetchSize() { - + bitField0_ = (bitField0_ & ~0x00000004); fetchSize_ = 0; onChanged(); return this; } - + + /** + *
+       * 默认-1时代表不控制
+       * 
+ * + * int64 timeout = 4; + * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return timeoutPresentCase_ == 4; + } /** *
        * 默认-1时代表不控制
        * 
* * int64 timeout = 4; + * @return The timeout. */ public long getTimeout() { if (timeoutPresentCase_ == 4) { @@ -8464,8 +8636,11 @@ public long getTimeout() { * * * int64 timeout = 4; + * @param value The timeout to set. + * @return This builder for chaining. */ public Builder setTimeout(long value) { + timeoutPresentCase_ = 4; timeoutPresent_ = value; onChanged(); @@ -8477,6 +8652,7 @@ public Builder setTimeout(long value) { * * * int64 timeout = 4; + * @return This builder for chaining. */ public Builder clearTimeout() { if (timeoutPresentCase_ == 4) { @@ -8489,10 +8665,22 @@ public Builder clearTimeout() { /** *
-       * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+       * 数字类型,0:纳秒,1:微秒,2:毫秒,3:秒,4:分钟,5:小时,6:天
+       * 
+ * + * int32 unit = 5; + * @return Whether the unit field is set. + */ + public boolean hasUnit() { + return unitPresentCase_ == 5; + } + /** + *
+       * 数字类型,0:纳秒,1:微秒,2:毫秒,3:秒,4:分钟,5:小时,6:天
        * 
* * int32 unit = 5; + * @return The unit. */ public int getUnit() { if (unitPresentCase_ == 5) { @@ -8502,12 +8690,15 @@ public int getUnit() { } /** *
-       * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+       * 数字类型,0:纳秒,1:微秒,2:毫秒,3:秒,4:分钟,5:小时,6:天
        * 
* * int32 unit = 5; + * @param value The unit to set. + * @return This builder for chaining. */ public Builder setUnit(int value) { + unitPresentCase_ = 5; unitPresent_ = value; onChanged(); @@ -8515,10 +8706,11 @@ public Builder setUnit(int value) { } /** *
-       * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+       * 数字类型,0:纳秒,1:微秒,2:毫秒,3:秒,4:分钟,5:小时,6:天
        * 
* * int32 unit = 5; + * @return This builder for chaining. */ public Builder clearUnit() { if (unitPresentCase_ == 5) { @@ -8535,6 +8727,18 @@ public Builder clearUnit() { * * * bool auto_ack = 6; + * @return Whether the autoAck field is set. + */ + public boolean hasAutoAck() { + return autoAckPresentCase_ == 6; + } + /** + *
+       * 是否自动ack
+       * 
+ * + * bool auto_ack = 6; + * @return The autoAck. */ public boolean getAutoAck() { if (autoAckPresentCase_ == 6) { @@ -8548,8 +8752,11 @@ public boolean getAutoAck() { * * * bool auto_ack = 6; + * @param value The autoAck to set. + * @return This builder for chaining. */ public Builder setAutoAck(boolean value) { + autoAckPresentCase_ = 6; autoAckPresent_ = value; onChanged(); @@ -8561,6 +8768,7 @@ public Builder setAutoAck(boolean value) { * * * bool auto_ack = 6; + * @return This builder for chaining. */ public Builder clearAutoAck() { if (autoAckPresentCase_ == 6) { @@ -8570,18 +8778,6 @@ public Builder clearAutoAck() { } return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Get) } @@ -8603,7 +8799,18 @@ public Get parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Get(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8629,19 +8836,24 @@ public interface MessagesOrBuilder extends /** * int64 batch_id = 1; + * @return The batchId. */ long getBatchId(); /** * repeated bytes messages = 2; + * @return A list containing the messages. */ java.util.List getMessagesList(); /** * repeated bytes messages = 2; + * @return The count of messages. */ int getMessagesCount(); /** * repeated bytes messages = 2; + * @param index The index of the element to return. + * @return The messages at the given index. */ com.google.protobuf.ByteString getMessages(int index); } @@ -8651,119 +8863,76 @@ public interface MessagesOrBuilder extends * * Protobuf type {@code com.alibaba.otter.canal.protocol.Messages} */ - public static final class Messages extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class Messages extends + com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Messages) MessagesOrBuilder { private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 3, + /* suffix= */ "", + Messages.class.getName()); + } // Use Messages.newBuilder() to construct. - private Messages(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Messages(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Messages() { - batchId_ = 0L; - messages_ = java.util.Collections.emptyList(); + messages_ = emptyList(com.google.protobuf.ByteString.class); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Messages( - 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: { - - batchId_ = input.readInt64(); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - messages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - messages_.add(input.readBytes()); - break; - } - default: { - if (!parseUnknownFieldProto3( - 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) == 0x00000002)) { - messages_ = java.util.Collections.unmodifiableList(messages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor; } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable .ensureFieldAccessorsInitialized( com.alibaba.otter.canal.protocol.CanalPacket.Messages.class, com.alibaba.otter.canal.protocol.CanalPacket.Messages.Builder.class); } - private int bitField0_; public static final int BATCH_ID_FIELD_NUMBER = 1; - private long batchId_; + private long batchId_ = 0L; /** * int64 batch_id = 1; + * @return The batchId. */ + @java.lang.Override public long getBatchId() { return batchId_; } public static final int MESSAGES_FIELD_NUMBER = 2; - private java.util.List messages_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.ProtobufList messages_ = + emptyList(com.google.protobuf.ByteString.class); /** * repeated bytes messages = 2; + * @return A list containing the messages. */ + @java.lang.Override public java.util.List getMessagesList() { return messages_; } /** * repeated bytes messages = 2; + * @return The count of messages. */ public int getMessagesCount() { return messages_.size(); } /** * repeated bytes messages = 2; + * @param index The index of the element to return. + * @return The messages at the given index. */ public com.google.protobuf.ByteString getMessages(int index) { return messages_.get(index); @@ -8789,7 +8958,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < messages_.size(); i++) { output.writeBytes(2, messages_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8811,7 +8980,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getMessagesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8826,13 +8995,12 @@ public boolean equals(final java.lang.Object obj) { } com.alibaba.otter.canal.protocol.CanalPacket.Messages other = (com.alibaba.otter.canal.protocol.CanalPacket.Messages) obj; - boolean result = true; - result = result && (getBatchId() - == other.getBatchId()); - result = result && getMessagesList() - .equals(other.getMessagesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getBatchId() + != other.getBatchId()) return false; + if (!getMessagesList() + .equals(other.getMessagesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override @@ -8849,7 +9017,7 @@ public int hashCode() { hash = (37 * hash) + MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getMessagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8888,39 +9056,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom( } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } + public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 + return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input, extensionRegistry); } @@ -8940,7 +9110,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -8951,7 +9121,7 @@ protected Builder newBuilderForType( * Protobuf type {@code com.alibaba.otter.canal.protocol.Messages} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Messages) com.alibaba.otter.canal.protocol.CanalPacket.MessagesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -8960,7 +9130,7 @@ public static final class Builder extends } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -8969,26 +9139,20 @@ public static final class Builder extends // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Messages.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; batchId_ = 0L; - - messages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + messages_ = emptyList(com.google.protobuf.ByteString.class); return this; } @@ -9015,51 +9179,22 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Messages build() { @java.lang.Override public com.alibaba.otter.canal.protocol.CanalPacket.Messages buildPartial() { com.alibaba.otter.canal.protocol.CanalPacket.Messages result = new com.alibaba.otter.canal.protocol.CanalPacket.Messages(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.batchId_ = batchId_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - messages_ = java.util.Collections.unmodifiableList(messages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.messages_ = messages_; - result.bitField0_ = to_bitField0_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.Messages result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.batchId_ = batchId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + messages_.makeImmutable(); + result.messages_ = messages_; + } } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Messages) { @@ -9078,14 +9213,15 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Messages o if (!other.messages_.isEmpty()) { if (messages_.isEmpty()) { messages_ = other.messages_; - bitField0_ = (bitField0_ & ~0x00000002); + messages_.makeImmutable(); + bitField0_ |= 0x00000002; } else { ensureMessagesIsMutable(); messages_.addAll(other.messages_); } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9100,17 +9236,41 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalPacket.Messages parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + batchId_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + com.google.protobuf.ByteString v = input.readBytes(); + ensureMessagesIsMutable(); + messages_.add(v); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Messages) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -9118,112 +9278,118 @@ public Builder mergeFrom( private long batchId_ ; /** * int64 batch_id = 1; + * @return The batchId. */ + @java.lang.Override public long getBatchId() { return batchId_; } /** * int64 batch_id = 1; + * @param value The batchId to set. + * @return This builder for chaining. */ public Builder setBatchId(long value) { - + batchId_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** * int64 batch_id = 1; + * @return This builder for chaining. */ public Builder clearBatchId() { - + bitField0_ = (bitField0_ & ~0x00000001); batchId_ = 0L; onChanged(); return this; } - private java.util.List messages_ = java.util.Collections.emptyList(); + private com.google.protobuf.Internal.ProtobufList messages_ = emptyList(com.google.protobuf.ByteString.class); private void ensureMessagesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - messages_ = new java.util.ArrayList(messages_); - bitField0_ |= 0x00000002; - } + if (!messages_.isModifiable()) { + messages_ = makeMutableCopy(messages_); + } + bitField0_ |= 0x00000002; } /** * repeated bytes messages = 2; + * @return A list containing the messages. */ public java.util.List getMessagesList() { - return java.util.Collections.unmodifiableList(messages_); + messages_.makeImmutable(); + return messages_; } /** * repeated bytes messages = 2; + * @return The count of messages. */ public int getMessagesCount() { return messages_.size(); } /** * repeated bytes messages = 2; + * @param index The index of the element to return. + * @return The messages at the given index. */ public com.google.protobuf.ByteString getMessages(int index) { return messages_.get(index); } /** * repeated bytes messages = 2; + * @param index The index to set the value at. + * @param value The messages to set. + * @return This builder for chaining. */ public Builder setMessages( int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessagesIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureMessagesIsMutable(); messages_.set(index, value); + bitField0_ |= 0x00000002; onChanged(); return this; } /** * repeated bytes messages = 2; + * @param value The messages to add. + * @return This builder for chaining. */ public Builder addMessages(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessagesIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureMessagesIsMutable(); messages_.add(value); + bitField0_ |= 0x00000002; onChanged(); return this; } /** * repeated bytes messages = 2; + * @param values The messages to add. + * @return This builder for chaining. */ public Builder addAllMessages( java.lang.Iterable values) { ensureMessagesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, messages_); + bitField0_ |= 0x00000002; onChanged(); return this; } /** * repeated bytes messages = 2; + * @return This builder for chaining. */ public Builder clearMessages() { - messages_ = java.util.Collections.emptyList(); + messages_ = emptyList(com.google.protobuf.ByteString.class); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Messages) } @@ -9245,7 +9411,18 @@ public Messages parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Messages(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9271,25 +9448,34 @@ public interface DumpOrBuilder extends /** * string journal = 1; + * @return The journal. */ java.lang.String getJournal(); /** * string journal = 1; + * @return The bytes for journal. */ com.google.protobuf.ByteString getJournalBytes(); /** * int64 position = 2; + * @return The position. */ long getPosition(); /** * int64 timestamp = 3; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * int64 timestamp = 3; + * @return The timestamp. */ long getTimestamp(); - public com.alibaba.otter.canal.protocol.CanalPacket.Dump.TimestampPresentCase getTimestampPresentCase(); + com.alibaba.otter.canal.protocol.CanalPacket.Dump.TimestampPresentCase getTimestampPresentCase(); } /** *
@@ -9298,86 +9484,35 @@ public interface DumpOrBuilder extends
    *
    * Protobuf type {@code com.alibaba.otter.canal.protocol.Dump}
    */
-  public  static final class Dump extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public static final class Dump extends
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Dump)
       DumpOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 29,
+        /* patch= */ 3,
+        /* suffix= */ "",
+        Dump.class.getName());
+    }
     // Use Dump.newBuilder() to construct.
-    private Dump(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private Dump(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private Dump() {
       journal_ = "";
-      position_ = 0L;
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private Dump(
-        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: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              journal_ = s;
-              break;
-            }
-            case 16: {
-
-              position_ = input.readInt64();
-              break;
-            }
-            case 24: {
-              timestampPresentCase_ = 3;
-              timestampPresent_ = input.readInt64();
-              break;
-            }
-            default: {
-              if (!parseUnknownFieldProto3(
-                  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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -9385,9 +9520,11 @@ private Dump(
     }
 
     private int timestampPresentCase_ = 0;
+    @SuppressWarnings("serial")
     private java.lang.Object timestampPresent_;
     public enum TimestampPresentCase
-        implements com.google.protobuf.Internal.EnumLite {
+        implements com.google.protobuf.Internal.EnumLite,
+            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
       TIMESTAMP(3),
       TIMESTAMPPRESENT_NOT_SET(0);
       private final int value;
@@ -9395,6 +9532,8 @@ private TimestampPresentCase(int value) {
         this.value = value;
       }
       /**
+       * @param value The number of the enum to look for.
+       * @return The enum associated with the given number.
        * @deprecated Use {@link #forNumber(int)} instead.
        */
       @java.lang.Deprecated
@@ -9421,10 +9560,13 @@ public int getNumber() {
     }
 
     public static final int JOURNAL_FIELD_NUMBER = 1;
-    private volatile java.lang.Object journal_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object journal_ = "";
     /**
      * string journal = 1;
+     * @return The journal.
      */
+    @java.lang.Override
     public java.lang.String getJournal() {
       java.lang.Object ref = journal_;
       if (ref instanceof java.lang.String) {
@@ -9439,7 +9581,9 @@ public java.lang.String getJournal() {
     }
     /**
      * string journal = 1;
+     * @return The bytes for journal.
      */
+    @java.lang.Override
     public com.google.protobuf.ByteString
         getJournalBytes() {
       java.lang.Object ref = journal_;
@@ -9455,10 +9599,12 @@ public java.lang.String getJournal() {
     }
 
     public static final int POSITION_FIELD_NUMBER = 2;
-    private long position_;
+    private long position_ = 0L;
     /**
      * int64 position = 2;
+     * @return The position.
      */
+    @java.lang.Override
     public long getPosition() {
       return position_;
     }
@@ -9466,7 +9612,17 @@ public long getPosition() {
     public static final int TIMESTAMP_FIELD_NUMBER = 3;
     /**
      * int64 timestamp = 3;
+     * @return Whether the timestamp field is set.
+     */
+    @java.lang.Override
+    public boolean hasTimestamp() {
+      return timestampPresentCase_ == 3;
+    }
+    /**
+     * int64 timestamp = 3;
+     * @return The timestamp.
      */
+    @java.lang.Override
     public long getTimestamp() {
       if (timestampPresentCase_ == 3) {
         return (java.lang.Long) timestampPresent_;
@@ -9488,8 +9644,8 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!getJournalBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, journal_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(journal_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, journal_);
       }
       if (position_ != 0L) {
         output.writeInt64(2, position_);
@@ -9498,7 +9654,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
         output.writeInt64(
             3, (long)((java.lang.Long) timestampPresent_));
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -9507,8 +9663,8 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!getJournalBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, journal_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(journal_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, journal_);
       }
       if (position_ != 0L) {
         size += com.google.protobuf.CodedOutputStream
@@ -9519,7 +9675,7 @@ public int getSerializedSize() {
           .computeInt64Size(
               3, (long)((java.lang.Long) timestampPresent_));
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -9534,24 +9690,21 @@ public boolean equals(final java.lang.Object obj) {
       }
       com.alibaba.otter.canal.protocol.CanalPacket.Dump other = (com.alibaba.otter.canal.protocol.CanalPacket.Dump) obj;
 
-      boolean result = true;
-      result = result && getJournal()
-          .equals(other.getJournal());
-      result = result && (getPosition()
-          == other.getPosition());
-      result = result && getTimestampPresentCase().equals(
-          other.getTimestampPresentCase());
-      if (!result) return false;
+      if (!getJournal()
+          .equals(other.getJournal())) return false;
+      if (getPosition()
+          != other.getPosition()) return false;
+      if (!getTimestampPresentCase().equals(other.getTimestampPresentCase())) return false;
       switch (timestampPresentCase_) {
         case 3:
-          result = result && (getTimestamp()
-              == other.getTimestamp());
+          if (getTimestamp()
+              != other.getTimestamp()) return false;
           break;
         case 0:
         default:
       }
-      result = result && unknownFields.equals(other.unknownFields);
-      return result;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      return true;
     }
 
     @java.lang.Override
@@ -9575,7 +9728,7 @@ public int hashCode() {
         case 0:
         default:
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -9614,39 +9767,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
     }
     public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -9666,7 +9821,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -9678,7 +9833,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code com.alibaba.otter.canal.protocol.Dump}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Dump)
         com.alibaba.otter.canal.protocol.CanalPacket.DumpOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -9687,7 +9842,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -9696,26 +9851,20 @@ public static final class Builder extends
 
       // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Dump.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         journal_ = "";
-
         position_ = 0L;
-
         timestampPresentCase_ = 0;
         timestampPresent_ = null;
         return this;
@@ -9744,48 +9893,27 @@ public com.alibaba.otter.canal.protocol.CanalPacket.Dump build() {
       @java.lang.Override
       public com.alibaba.otter.canal.protocol.CanalPacket.Dump buildPartial() {
         com.alibaba.otter.canal.protocol.CanalPacket.Dump result = new com.alibaba.otter.canal.protocol.CanalPacket.Dump(this);
-        result.journal_ = journal_;
-        result.position_ = position_;
-        if (timestampPresentCase_ == 3) {
-          result.timestampPresent_ = timestampPresent_;
-        }
-        result.timestampPresentCase_ = timestampPresentCase_;
+        if (bitField0_ != 0) { buildPartial0(result); }
+        buildPartialOneofs(result);
         onBuilt();
         return result;
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return (Builder) super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return (Builder) super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return (Builder) super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return (Builder) super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return (Builder) super.setRepeatedField(field, index, value);
+      private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.Dump result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          result.journal_ = journal_;
+        }
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          result.position_ = position_;
+        }
       }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return (Builder) super.addRepeatedField(field, value);
+
+      private void buildPartialOneofs(com.alibaba.otter.canal.protocol.CanalPacket.Dump result) {
+        result.timestampPresentCase_ = timestampPresentCase_;
+        result.timestampPresent_ = this.timestampPresent_;
       }
+
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Dump) {
@@ -9800,6 +9928,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Dump other
         if (other == com.alibaba.otter.canal.protocol.CanalPacket.Dump.getDefaultInstance()) return this;
         if (!other.getJournal().isEmpty()) {
           journal_ = other.journal_;
+          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (other.getPosition() != 0L) {
@@ -9814,7 +9943,7 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Dump other
             break;
           }
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -9829,17 +9958,45 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        com.alibaba.otter.canal.protocol.CanalPacket.Dump parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                journal_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000001;
+                break;
+              } // case 10
+              case 16: {
+                position_ = input.readInt64();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 16
+              case 24: {
+                timestampPresent_ = input.readInt64();
+                timestampPresentCase_ = 3;
+                break;
+              } // case 24
+              default: {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+            } // switch (tag)
+          } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Dump) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int timestampPresentCase_ = 0;
@@ -9857,10 +10014,12 @@ public Builder clearTimestampPresent() {
         return this;
       }
 
+      private int bitField0_;
 
       private java.lang.Object journal_ = "";
       /**
        * string journal = 1;
+       * @return The journal.
        */
       public java.lang.String getJournal() {
         java.lang.Object ref = journal_;
@@ -9876,6 +10035,7 @@ public java.lang.String getJournal() {
       }
       /**
        * string journal = 1;
+       * @return The bytes for journal.
        */
       public com.google.protobuf.ByteString
           getJournalBytes() {
@@ -9892,37 +10052,38 @@ public java.lang.String getJournal() {
       }
       /**
        * string journal = 1;
+       * @param value The journal to set.
+       * @return This builder for chaining.
        */
       public Builder setJournal(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         journal_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
       /**
        * string journal = 1;
+       * @return This builder for chaining.
        */
       public Builder clearJournal() {
-        
         journal_ = getDefaultInstance().getJournal();
+        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
       /**
        * string journal = 1;
+       * @param value The bytes for journal to set.
+       * @return This builder for chaining.
        */
       public Builder setJournalBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         journal_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -9930,24 +10091,30 @@ public Builder setJournalBytes(
       private long position_ ;
       /**
        * int64 position = 2;
+       * @return The position.
        */
+      @java.lang.Override
       public long getPosition() {
         return position_;
       }
       /**
        * int64 position = 2;
+       * @param value The position to set.
+       * @return This builder for chaining.
        */
       public Builder setPosition(long value) {
-        
+
         position_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
       /**
        * int64 position = 2;
+       * @return This builder for chaining.
        */
       public Builder clearPosition() {
-        
+        bitField0_ = (bitField0_ & ~0x00000002);
         position_ = 0L;
         onChanged();
         return this;
@@ -9955,6 +10122,14 @@ public Builder clearPosition() {
 
       /**
        * int64 timestamp = 3;
+       * @return Whether the timestamp field is set.
+       */
+      public boolean hasTimestamp() {
+        return timestampPresentCase_ == 3;
+      }
+      /**
+       * int64 timestamp = 3;
+       * @return The timestamp.
        */
       public long getTimestamp() {
         if (timestampPresentCase_ == 3) {
@@ -9964,8 +10139,11 @@ public long getTimestamp() {
       }
       /**
        * int64 timestamp = 3;
+       * @param value The timestamp to set.
+       * @return This builder for chaining.
        */
       public Builder setTimestamp(long value) {
+
         timestampPresentCase_ = 3;
         timestampPresent_ = value;
         onChanged();
@@ -9973,6 +10151,7 @@ public Builder setTimestamp(long value) {
       }
       /**
        * int64 timestamp = 3;
+       * @return This builder for chaining.
        */
       public Builder clearTimestamp() {
         if (timestampPresentCase_ == 3) {
@@ -9982,18 +10161,6 @@ public Builder clearTimestamp() {
         }
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFieldsProto3(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Dump)
     }
@@ -10015,7 +10182,18 @@ public Dump parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new Dump(input, extensionRegistry);
+        Builder builder = newBuilder();
+        try {
+          builder.mergeFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          throw e.setUnfinishedMessage(builder.buildPartial());
+        } catch (com.google.protobuf.UninitializedMessageException e) {
+          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+        } catch (java.io.IOException e) {
+          throw new com.google.protobuf.InvalidProtocolBufferException(e)
+              .setUnfinishedMessage(builder.buildPartial());
+        }
+        return builder.buildPartial();
       }
     };
 
@@ -10041,114 +10219,67 @@ public interface ClientRollbackOrBuilder extends
 
     /**
      * string destination = 1;
+     * @return The destination.
      */
     java.lang.String getDestination();
     /**
      * string destination = 1;
+     * @return The bytes for destination.
      */
     com.google.protobuf.ByteString
         getDestinationBytes();
 
     /**
      * string client_id = 2;
+     * @return The clientId.
      */
     java.lang.String getClientId();
     /**
      * string client_id = 2;
+     * @return The bytes for clientId.
      */
     com.google.protobuf.ByteString
         getClientIdBytes();
 
     /**
      * int64 batch_id = 3;
+     * @return The batchId.
      */
     long getBatchId();
   }
   /**
    * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientRollback}
    */
-  public  static final class ClientRollback extends
-      com.google.protobuf.GeneratedMessageV3 implements
+  public static final class ClientRollback extends
+      com.google.protobuf.GeneratedMessage implements
       // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ClientRollback)
       ClientRollbackOrBuilder {
   private static final long serialVersionUID = 0L;
+    static {
+      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+        /* major= */ 4,
+        /* minor= */ 29,
+        /* patch= */ 3,
+        /* suffix= */ "",
+        ClientRollback.class.getName());
+    }
     // Use ClientRollback.newBuilder() to construct.
-    private ClientRollback(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+    private ClientRollback(com.google.protobuf.GeneratedMessage.Builder builder) {
       super(builder);
     }
     private ClientRollback() {
       destination_ = "";
       clientId_ = "";
-      batchId_ = 0L;
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
     }
-    private ClientRollback(
-        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: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              destination_ = s;
-              break;
-            }
-            case 18: {
-              java.lang.String s = input.readStringRequireUtf8();
 
-              clientId_ = s;
-              break;
-            }
-            case 24: {
-
-              batchId_ = input.readInt64();
-              break;
-            }
-            default: {
-              if (!parseUnknownFieldProto3(
-                  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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor;
     }
 
     @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
         internalGetFieldAccessorTable() {
       return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -10156,10 +10287,13 @@ private ClientRollback(
     }
 
     public static final int DESTINATION_FIELD_NUMBER = 1;
-    private volatile java.lang.Object destination_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object destination_ = "";
     /**
      * string destination = 1;
+     * @return The destination.
      */
+    @java.lang.Override
     public java.lang.String getDestination() {
       java.lang.Object ref = destination_;
       if (ref instanceof java.lang.String) {
@@ -10174,7 +10308,9 @@ public java.lang.String getDestination() {
     }
     /**
      * string destination = 1;
+     * @return The bytes for destination.
      */
+    @java.lang.Override
     public com.google.protobuf.ByteString
         getDestinationBytes() {
       java.lang.Object ref = destination_;
@@ -10190,10 +10326,13 @@ public java.lang.String getDestination() {
     }
 
     public static final int CLIENT_ID_FIELD_NUMBER = 2;
-    private volatile java.lang.Object clientId_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object clientId_ = "";
     /**
      * string client_id = 2;
+     * @return The clientId.
      */
+    @java.lang.Override
     public java.lang.String getClientId() {
       java.lang.Object ref = clientId_;
       if (ref instanceof java.lang.String) {
@@ -10208,7 +10347,9 @@ public java.lang.String getClientId() {
     }
     /**
      * string client_id = 2;
+     * @return The bytes for clientId.
      */
+    @java.lang.Override
     public com.google.protobuf.ByteString
         getClientIdBytes() {
       java.lang.Object ref = clientId_;
@@ -10224,10 +10365,12 @@ public java.lang.String getClientId() {
     }
 
     public static final int BATCH_ID_FIELD_NUMBER = 3;
-    private long batchId_;
+    private long batchId_ = 0L;
     /**
      * int64 batch_id = 3;
+     * @return The batchId.
      */
+    @java.lang.Override
     public long getBatchId() {
       return batchId_;
     }
@@ -10246,16 +10389,16 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!getDestinationBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 1, destination_);
       }
-      if (!getClientIdBytes().isEmpty()) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) {
+        com.google.protobuf.GeneratedMessage.writeString(output, 2, clientId_);
       }
       if (batchId_ != 0L) {
         output.writeInt64(3, batchId_);
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -10264,17 +10407,17 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!getDestinationBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destination_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, destination_);
       }
-      if (!getClientIdBytes().isEmpty()) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_);
+      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientId_)) {
+        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clientId_);
       }
       if (batchId_ != 0L) {
         size += com.google.protobuf.CodedOutputStream
           .computeInt64Size(3, batchId_);
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -10289,15 +10432,14 @@ public boolean equals(final java.lang.Object obj) {
       }
       com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback other = (com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback) obj;
 
-      boolean result = true;
-      result = result && getDestination()
-          .equals(other.getDestination());
-      result = result && getClientId()
-          .equals(other.getClientId());
-      result = result && (getBatchId()
-          == other.getBatchId());
-      result = result && unknownFields.equals(other.unknownFields);
-      return result;
+      if (!getDestination()
+          .equals(other.getDestination())) return false;
+      if (!getClientId()
+          .equals(other.getClientId())) return false;
+      if (getBatchId()
+          != other.getBatchId()) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      return true;
     }
 
     @java.lang.Override
@@ -10314,7 +10456,7 @@ public int hashCode() {
       hash = (37 * hash) + BATCH_ID_FIELD_NUMBER;
       hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
           getBatchId());
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -10353,39 +10495,41 @@ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseF
     }
     public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
     public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input);
     }
     public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
+      return com.google.protobuf.GeneratedMessage
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
 
@@ -10405,7 +10549,7 @@ public Builder toBuilder() {
 
     @java.lang.Override
     protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
       Builder builder = new Builder(parent);
       return builder;
     }
@@ -10413,7 +10557,7 @@ protected Builder newBuilderForType(
      * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientRollback}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
+        com.google.protobuf.GeneratedMessage.Builder implements
         // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.ClientRollback)
         com.alibaba.otter.canal.protocol.CanalPacket.ClientRollbackOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
@@ -10422,7 +10566,7 @@ public static final class Builder extends
       }
 
       @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
           internalGetFieldAccessorTable() {
         return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
@@ -10431,28 +10575,21 @@ public static final class Builder extends
 
       // Construct using com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         destination_ = "";
-
         clientId_ = "";
-
         batchId_ = 0L;
-
         return this;
       }
 
@@ -10479,45 +10616,24 @@ public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback build() {
       @java.lang.Override
       public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback buildPartial() {
         com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback result = new com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback(this);
-        result.destination_ = destination_;
-        result.clientId_ = clientId_;
-        result.batchId_ = batchId_;
+        if (bitField0_ != 0) { buildPartial0(result); }
         onBuilt();
         return result;
       }
 
-      @java.lang.Override
-      public Builder clone() {
-        return (Builder) super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return (Builder) super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return (Builder) super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return (Builder) super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return (Builder) super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return (Builder) super.addRepeatedField(field, value);
+      private void buildPartial0(com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          result.destination_ = destination_;
+        }
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          result.clientId_ = clientId_;
+        }
+        if (((from_bitField0_ & 0x00000004) != 0)) {
+          result.batchId_ = batchId_;
+        }
       }
+
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
         if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback) {
@@ -10532,16 +10648,18 @@ public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.ClientRoll
         if (other == com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.getDefaultInstance()) return this;
         if (!other.getDestination().isEmpty()) {
           destination_ = other.destination_;
+          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getClientId().isEmpty()) {
           clientId_ = other.clientId_;
+          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (other.getBatchId() != 0L) {
           setBatchId(other.getBatchId());
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -10556,23 +10674,53 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                destination_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000001;
+                break;
+              } // case 10
+              case 18: {
+                clientId_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 18
+              case 24: {
+                batchId_ = input.readInt64();
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 24
+              default: {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+            } // switch (tag)
+          } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
+      private int bitField0_;
 
       private java.lang.Object destination_ = "";
       /**
        * string destination = 1;
+       * @return The destination.
        */
       public java.lang.String getDestination() {
         java.lang.Object ref = destination_;
@@ -10588,6 +10736,7 @@ public java.lang.String getDestination() {
       }
       /**
        * string destination = 1;
+       * @return The bytes for destination.
        */
       public com.google.protobuf.ByteString
           getDestinationBytes() {
@@ -10604,37 +10753,38 @@ public java.lang.String getDestination() {
       }
       /**
        * string destination = 1;
+       * @param value The destination to set.
+       * @return This builder for chaining.
        */
       public Builder setDestination(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         destination_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
       /**
        * string destination = 1;
+       * @return This builder for chaining.
        */
       public Builder clearDestination() {
-        
         destination_ = getDefaultInstance().getDestination();
+        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
       /**
        * string destination = 1;
+       * @param value The bytes for destination to set.
+       * @return This builder for chaining.
        */
       public Builder setDestinationBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         destination_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -10642,6 +10792,7 @@ public Builder setDestinationBytes(
       private java.lang.Object clientId_ = "";
       /**
        * string client_id = 2;
+       * @return The clientId.
        */
       public java.lang.String getClientId() {
         java.lang.Object ref = clientId_;
@@ -10657,6 +10808,7 @@ public java.lang.String getClientId() {
       }
       /**
        * string client_id = 2;
+       * @return The bytes for clientId.
        */
       public com.google.protobuf.ByteString
           getClientIdBytes() {
@@ -10673,37 +10825,38 @@ public java.lang.String getClientId() {
       }
       /**
        * string client_id = 2;
+       * @param value The clientId to set.
+       * @return This builder for chaining.
        */
       public Builder setClientId(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         clientId_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
       /**
        * string client_id = 2;
+       * @return This builder for chaining.
        */
       public Builder clearClientId() {
-        
         clientId_ = getDefaultInstance().getClientId();
+        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
       /**
        * string client_id = 2;
+       * @param value The bytes for clientId to set.
+       * @return This builder for chaining.
        */
       public Builder setClientIdBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         clientId_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -10711,40 +10864,34 @@ public Builder setClientIdBytes(
       private long batchId_ ;
       /**
        * int64 batch_id = 3;
+       * @return The batchId.
        */
+      @java.lang.Override
       public long getBatchId() {
         return batchId_;
       }
       /**
        * int64 batch_id = 3;
+       * @param value The batchId to set.
+       * @return This builder for chaining.
        */
       public Builder setBatchId(long value) {
-        
+
         batchId_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
       /**
        * int64 batch_id = 3;
+       * @return This builder for chaining.
        */
       public Builder clearBatchId() {
-        
+        bitField0_ = (bitField0_ & ~0x00000004);
         batchId_ = 0L;
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFieldsProto3(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
 
       // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.ClientRollback)
     }
@@ -10766,7 +10913,18 @@ public ClientRollback parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new ClientRollback(input, extensionRegistry);
+        Builder builder = newBuilder();
+        try {
+          builder.mergeFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          throw e.setUnfinishedMessage(builder.buildPartial());
+        } catch (com.google.protobuf.UninitializedMessageException e) {
+          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+        } catch (java.io.IOException e) {
+          throw new com.google.protobuf.InvalidProtocolBufferException(e)
+              .setUnfinishedMessage(builder.buildPartial());
+        }
+        return builder.buildPartial();
       }
     };
 
@@ -10789,62 +10947,62 @@ public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback getDefaultIns
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_Get_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable;
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor;
   private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable;
 
   public static com.google.protobuf.Descriptors.FileDescriptor
@@ -10855,138 +11013,131 @@ public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback getDefaultIns
       descriptor;
   static {
     java.lang.String[] descriptorData = {
-      "\n\023CanalProtocol.proto\022 com.alibaba.otter" +
-      ".canal.protocol\"\205\002\n\006Packet\022\026\n\014magic_numb" +
-      "er\030\001 \001(\005H\000\022\021\n\007version\030\002 \001(\005H\001\022:\n\004type\030\003 " +
-      "\001(\0162,.com.alibaba.otter.canal.protocol.P" +
-      "acketType\022D\n\013compression\030\004 \001(\0162-.com.ali" +
-      "baba.otter.canal.protocol.CompressionH\002\022" +
-      "\014\n\004body\030\005 \001(\014B\026\n\024magic_number_presentB\021\n" +
-      "\017version_presentB\025\n\023compression_present\"" +
-      "<\n\tHeartBeat\022\026\n\016send_timestamp\030\001 \001(\003\022\027\n\017" +
-      "start_timestamp\030\002 \001(\003\"\255\001\n\tHandshake\022 \n\026c" +
-      "ommunication_encoding\030\001 \001(\tH\000\022\r\n\005seeds\030\002" +
-      " \001(\014\022M\n\026supported_compressions\030\003 \001(\0162-.c" +
-      "om.alibaba.otter.canal.protocol.Compress" +
-      "ionB \n\036communication_encoding_present\"\363\001" +
-      "\n\nClientAuth\022\020\n\010username\030\001 \001(\t\022\020\n\010passwo" +
-      "rd\030\002 \001(\014\022\032\n\020net_read_timeout\030\003 \001(\005H\000\022\033\n\021" +
-      "net_write_timeout\030\004 \001(\005H\001\022\023\n\013destination" +
-      "\030\005 \001(\t\022\021\n\tclient_id\030\006 \001(\t\022\016\n\006filter\030\007 \001(" +
-      "\t\022\027\n\017start_timestamp\030\010 \001(\003B\032\n\030net_read_t" +
-      "imeout_presentB\033\n\031net_write_timeout_pres" +
-      "ent\"H\n\003Ack\022\024\n\nerror_code\030\001 \001(\005H\000\022\025\n\rerro" +
-      "r_message\030\002 \001(\tB\024\n\022error_code_present\"E\n" +
-      "\tClientAck\022\023\n\013destination\030\001 \001(\t\022\021\n\tclien" +
-      "t_id\030\002 \001(\t\022\020\n\010batch_id\030\003 \001(\003\"=\n\003Sub\022\023\n\013d" +
-      "estination\030\001 \001(\t\022\021\n\tclient_id\030\002 \001(\t\022\016\n\006f" +
-      "ilter\030\007 \001(\t\"?\n\005Unsub\022\023\n\013destination\030\001 \001(" +
-      "\t\022\021\n\tclient_id\030\002 \001(\t\022\016\n\006filter\030\007 \001(\t\"\257\001\n" +
-      "\003Get\022\023\n\013destination\030\001 \001(\t\022\021\n\tclient_id\030\002" +
-      " \001(\t\022\022\n\nfetch_size\030\003 \001(\005\022\021\n\007timeout\030\004 \001(" +
-      "\003H\000\022\016\n\004unit\030\005 \001(\005H\001\022\022\n\010auto_ack\030\006 \001(\010H\002B" +
-      "\021\n\017timeout_presentB\016\n\014unit_presentB\022\n\020au" +
-      "to_ack_present\".\n\010Messages\022\020\n\010batch_id\030\001" +
-      " \001(\003\022\020\n\010messages\030\002 \003(\014\"S\n\004Dump\022\017\n\007journa" +
-      "l\030\001 \001(\t\022\020\n\010position\030\002 \001(\003\022\023\n\ttimestamp\030\003" +
-      " \001(\003H\000B\023\n\021timestamp_present\"J\n\016ClientRol" +
-      "lback\022\023\n\013destination\030\001 \001(\t\022\021\n\tclient_id\030" +
-      "\002 \001(\t\022\020\n\010batch_id\030\003 \001(\003*U\n\013Compression\022\037" +
-      "\n\033COMPRESSIONCOMPATIBLEPROTO2\020\000\022\010\n\004NONE\020" +
-      "\001\022\010\n\004ZLIB\020\002\022\010\n\004GZIP\020\003\022\007\n\003LZF\020\004*\346\001\n\nPacke" +
-      "tType\022\037\n\033PACKAGETYPECOMPATIBLEPROTO2\020\000\022\r" +
-      "\n\tHANDSHAKE\020\001\022\030\n\024CLIENTAUTHENTICATION\020\002\022" +
-      "\007\n\003ACK\020\003\022\020\n\014SUBSCRIPTION\020\004\022\022\n\016UNSUBSCRIP" +
-      "TION\020\005\022\007\n\003GET\020\006\022\014\n\010MESSAGES\020\007\022\r\n\tCLIENTA" +
-      "CK\020\010\022\014\n\010SHUTDOWN\020\t\022\010\n\004DUMP\020\n\022\r\n\tHEARTBEA" +
-      "T\020\013\022\022\n\016CLIENTROLLBACK\020\014B1\n com.alibaba.o" +
-      "tter.canal.protocolB\013CanalPacketH\001b\006prot" +
-      "o3"
+      "\n4com/alibaba/otter/canal/protocol/Canal" +
+      "Protocol.proto\022 com.alibaba.otter.canal." +
+      "protocol\"\205\002\n\006Packet\022\026\n\014magic_number\030\001 \001(" +
+      "\005H\000\022\021\n\007version\030\002 \001(\005H\001\022:\n\004type\030\003 \001(\0162,.c" +
+      "om.alibaba.otter.canal.protocol.PacketTy" +
+      "pe\022D\n\013compression\030\004 \001(\0162-.com.alibaba.ot" +
+      "ter.canal.protocol.CompressionH\002\022\014\n\004body" +
+      "\030\005 \001(\014B\026\n\024magic_number_presentB\021\n\017versio" +
+      "n_presentB\025\n\023compression_present\"<\n\tHear" +
+      "tBeat\022\026\n\016send_timestamp\030\001 \001(\003\022\027\n\017start_t" +
+      "imestamp\030\002 \001(\003\"\255\001\n\tHandshake\022 \n\026communic" +
+      "ation_encoding\030\001 \001(\tH\000\022\r\n\005seeds\030\002 \001(\014\022M\n" +
+      "\026supported_compressions\030\003 \001(\0162-.com.alib" +
+      "aba.otter.canal.protocol.CompressionB \n\036" +
+      "communication_encoding_present\"\363\001\n\nClien" +
+      "tAuth\022\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(" +
+      "\014\022\032\n\020net_read_timeout\030\003 \001(\005H\000\022\033\n\021net_wri" +
+      "te_timeout\030\004 \001(\005H\001\022\023\n\013destination\030\005 \001(\t\022" +
+      "\021\n\tclient_id\030\006 \001(\t\022\016\n\006filter\030\007 \001(\t\022\027\n\017st" +
+      "art_timestamp\030\010 \001(\003B\032\n\030net_read_timeout_" +
+      "presentB\033\n\031net_write_timeout_present\"H\n\003" +
+      "Ack\022\024\n\nerror_code\030\001 \001(\005H\000\022\025\n\rerror_messa" +
+      "ge\030\002 \001(\tB\024\n\022error_code_present\"E\n\tClient" +
+      "Ack\022\023\n\013destination\030\001 \001(\t\022\021\n\tclient_id\030\002 " +
+      "\001(\t\022\020\n\010batch_id\030\003 \001(\003\"=\n\003Sub\022\023\n\013destinat" +
+      "ion\030\001 \001(\t\022\021\n\tclient_id\030\002 \001(\t\022\016\n\006filter\030\007" +
+      " \001(\t\"?\n\005Unsub\022\023\n\013destination\030\001 \001(\t\022\021\n\tcl" +
+      "ient_id\030\002 \001(\t\022\016\n\006filter\030\007 \001(\t\"\257\001\n\003Get\022\023\n" +
+      "\013destination\030\001 \001(\t\022\021\n\tclient_id\030\002 \001(\t\022\022\n" +
+      "\nfetch_size\030\003 \001(\005\022\021\n\007timeout\030\004 \001(\003H\000\022\016\n\004" +
+      "unit\030\005 \001(\005H\001\022\022\n\010auto_ack\030\006 \001(\010H\002B\021\n\017time" +
+      "out_presentB\016\n\014unit_presentB\022\n\020auto_ack_" +
+      "present\".\n\010Messages\022\020\n\010batch_id\030\001 \001(\003\022\020\n" +
+      "\010messages\030\002 \003(\014\"S\n\004Dump\022\017\n\007journal\030\001 \001(\t" +
+      "\022\020\n\010position\030\002 \001(\003\022\023\n\ttimestamp\030\003 \001(\003H\000B" +
+      "\023\n\021timestamp_present\"J\n\016ClientRollback\022\023" +
+      "\n\013destination\030\001 \001(\t\022\021\n\tclient_id\030\002 \001(\t\022\020" +
+      "\n\010batch_id\030\003 \001(\003*U\n\013Compression\022\037\n\033COMPR" +
+      "ESSIONCOMPATIBLEPROTO2\020\000\022\010\n\004NONE\020\001\022\010\n\004ZL" +
+      "IB\020\002\022\010\n\004GZIP\020\003\022\007\n\003LZF\020\004*\346\001\n\nPacketType\022\037" +
+      "\n\033PACKAGETYPECOMPATIBLEPROTO2\020\000\022\r\n\tHANDS" +
+      "HAKE\020\001\022\030\n\024CLIENTAUTHENTICATION\020\002\022\007\n\003ACK\020" +
+      "\003\022\020\n\014SUBSCRIPTION\020\004\022\022\n\016UNSUBSCRIPTION\020\005\022" +
+      "\007\n\003GET\020\006\022\014\n\010MESSAGES\020\007\022\r\n\tCLIENTACK\020\010\022\014\n" +
+      "\010SHUTDOWN\020\t\022\010\n\004DUMP\020\n\022\r\n\tHEARTBEAT\020\013\022\022\n\016" +
+      "CLIENTROLLBACK\020\014B1\n com.alibaba.otter.ca" +
+      "nal.protocolB\013CanalPacketH\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
+    descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
         new com.google.protobuf.Descriptors.FileDescriptor[] {
-        }, assigner);
+        });
     internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor =
       getDescriptor().getMessageTypes().get(0);
     internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor,
         new java.lang.String[] { "MagicNumber", "Version", "Type", "Compression", "Body", "MagicNumberPresent", "VersionPresent", "CompressionPresent", });
     internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor =
       getDescriptor().getMessageTypes().get(1);
     internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor,
         new java.lang.String[] { "SendTimestamp", "StartTimestamp", });
     internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor =
       getDescriptor().getMessageTypes().get(2);
     internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor,
         new java.lang.String[] { "CommunicationEncoding", "Seeds", "SupportedCompressions", "CommunicationEncodingPresent", });
     internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor =
       getDescriptor().getMessageTypes().get(3);
     internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor,
         new java.lang.String[] { "Username", "Password", "NetReadTimeout", "NetWriteTimeout", "Destination", "ClientId", "Filter", "StartTimestamp", "NetReadTimeoutPresent", "NetWriteTimeoutPresent", });
     internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor =
       getDescriptor().getMessageTypes().get(4);
     internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor,
         new java.lang.String[] { "ErrorCode", "ErrorMessage", "ErrorCodePresent", });
     internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor =
       getDescriptor().getMessageTypes().get(5);
     internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor,
         new java.lang.String[] { "Destination", "ClientId", "BatchId", });
     internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor =
       getDescriptor().getMessageTypes().get(6);
     internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor,
         new java.lang.String[] { "Destination", "ClientId", "Filter", });
     internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor =
       getDescriptor().getMessageTypes().get(7);
     internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor,
         new java.lang.String[] { "Destination", "ClientId", "Filter", });
     internal_static_com_alibaba_otter_canal_protocol_Get_descriptor =
       getDescriptor().getMessageTypes().get(8);
     internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_Get_descriptor,
         new java.lang.String[] { "Destination", "ClientId", "FetchSize", "Timeout", "Unit", "AutoAck", "TimeoutPresent", "UnitPresent", "AutoAckPresent", });
     internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor =
       getDescriptor().getMessageTypes().get(9);
     internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor,
         new java.lang.String[] { "BatchId", "Messages", });
     internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor =
       getDescriptor().getMessageTypes().get(10);
     internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor,
         new java.lang.String[] { "Journal", "Position", "Timestamp", "TimestampPresent", });
     internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor =
       getDescriptor().getMessageTypes().get(11);
     internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
         internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor,
         new java.lang.String[] { "Destination", "ClientId", "BatchId", });
+    descriptor.resolveAllFeaturesImmutable();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/server/src/main/java/com/alibaba/otter/canal/server/netty/listener/ChannelFutureAggregator.java b/server/src/main/java/com/alibaba/otter/canal/server/netty/listener/ChannelFutureAggregator.java
index e479364070..2be77ff633 100644
--- a/server/src/main/java/com/alibaba/otter/canal/server/netty/listener/ChannelFutureAggregator.java
+++ b/server/src/main/java/com/alibaba/otter/canal/server/netty/listener/ChannelFutureAggregator.java
@@ -2,6 +2,7 @@
 
 import com.alibaba.otter.canal.protocol.CanalPacket;
 import com.google.common.base.Preconditions;
+import com.google.protobuf.GeneratedMessage;
 import com.google.protobuf.GeneratedMessageV3;
 import org.jboss.netty.channel.ChannelFuture;
 import org.jboss.netty.channel.ChannelFutureListener;
@@ -16,19 +17,19 @@ public class ChannelFutureAggregator implements ChannelFutureListener {
 
     private ClientRequestResult result;
 
-    public ChannelFutureAggregator(String destination, GeneratedMessageV3 request, CanalPacket.PacketType type, int amount, long latency, boolean empty) {
+    public ChannelFutureAggregator(String destination, GeneratedMessage request, CanalPacket.PacketType type, int amount, long latency, boolean empty) {
         this(destination, request, type, amount, latency, empty, (short) 0);
     }
 
-    public ChannelFutureAggregator(String destination, GeneratedMessageV3 request, CanalPacket.PacketType type, int amount, long latency) {
+    public ChannelFutureAggregator(String destination, GeneratedMessage request, CanalPacket.PacketType type, int amount, long latency) {
         this(destination, request, type, amount, latency, false, (short) 0);
     }
 
-    public ChannelFutureAggregator(String destination, GeneratedMessageV3 request, CanalPacket.PacketType type, int amount, long latency, short errorCode) {
+    public ChannelFutureAggregator(String destination, GeneratedMessage request, CanalPacket.PacketType type, int amount, long latency, short errorCode) {
         this(destination, request, type, amount, latency, false, errorCode);
     }
 
-    private ChannelFutureAggregator(String destination, GeneratedMessageV3 request, CanalPacket.PacketType type, int amount, long latency, boolean empty, short errorCode) {
+    private ChannelFutureAggregator(String destination, GeneratedMessage request, CanalPacket.PacketType type, int amount, long latency, boolean empty, short errorCode) {
         this.result = new ClientRequestResult.Builder()
                 .destination(destination)
                 .type(type)
@@ -56,7 +57,7 @@ public static class ClientRequestResult {
 
         private String                 destination;
         private CanalPacket.PacketType type;
-        private GeneratedMessageV3       request;
+        private GeneratedMessage       request;
         private int                    amount;
         private long                   latency;
         private short                  errorCode;
@@ -81,7 +82,7 @@ public static class Builder {
 
             private String                 destination;
             private CanalPacket.PacketType type;
-            private GeneratedMessageV3       request;
+            private GeneratedMessage       request;
             private int                    amount;
             private long                   latency;
             private short                  errorCode;
@@ -98,7 +99,7 @@ Builder type(CanalPacket.PacketType type) {
                 return this;
             }
 
-            Builder request(GeneratedMessageV3 request) {
+            Builder request(GeneratedMessage request) {
                 this.request = request;
                 return this;
             }
@@ -153,7 +154,7 @@ public CanalPacket.PacketType getType() {
             return type;
         }
 
-        public GeneratedMessageV3 getRequest() {
+        public GeneratedMessage getRequest() {
             return request;
         }