diff --git a/pom.xml b/pom.xml index 14938cb0..beb1c3d1 100644 --- a/pom.xml +++ b/pom.xml @@ -202,7 +202,7 @@ com.google.protobuf protobuf-java - 2.4.1 + 2.6.1 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 old mode 100755 new mode 100644 index 0942c0d7..f91c6790 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java @@ -8,22 +8,61 @@ public final class CanalEntry { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.EntryType} + * + *
+   **打散后的事件类型,主要用于标识事务的开始,变更数据,结束*
+   * 
+ */ public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { + /** + * TRANSACTIONBEGIN = 1; + */ TRANSACTIONBEGIN(0, 1), + /** + * ROWDATA = 2; + */ ROWDATA(1, 2), + /** + * TRANSACTIONEND = 3; + */ TRANSACTIONEND(2, 3), + /** + * HEARTBEAT = 4; + * + *
+     ** 心跳类型,内部使用,外部暂不可见,可忽略 *
+     * 
+ */ HEARTBEAT(3, 4), ; - + + /** + * TRANSACTIONBEGIN = 1; + */ public static final int TRANSACTIONBEGIN_VALUE = 1; + /** + * ROWDATA = 2; + */ public static final int ROWDATA_VALUE = 2; + /** + * TRANSACTIONEND = 3; + */ public static final int TRANSACTIONEND_VALUE = 3; + /** + * HEARTBEAT = 4; + * + *
+     ** 心跳类型,内部使用,外部暂不可见,可忽略 *
+     * 
+ */ public static final int HEARTBEAT_VALUE = 4; - - + + public final int getNumber() { return value; } - + public static EntryType valueOf(int value) { switch (value) { case 1: return TRANSACTIONBEGIN; @@ -33,7 +72,7 @@ public final class CanalEntry { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -45,7 +84,7 @@ public final class CanalEntry { return EntryType.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -58,11 +97,9 @@ public final class CanalEntry { getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(0); } - - private static final EntryType[] VALUES = { - TRANSACTIONBEGIN, ROWDATA, TRANSACTIONEND, HEARTBEAT, - }; - + + private static final EntryType[] VALUES = values(); + public static EntryType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -71,48 +108,129 @@ public final class CanalEntry { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private EntryType(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.EntryType) } - + + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.EventType} + * + *
+   ** 事件类型 *
+   * 
+ */ public enum EventType implements com.google.protobuf.ProtocolMessageEnum { + /** + * INSERT = 1; + */ INSERT(0, 1), + /** + * UPDATE = 2; + */ UPDATE(1, 2), + /** + * DELETE = 3; + */ DELETE(2, 3), + /** + * CREATE = 4; + */ CREATE(3, 4), + /** + * ALTER = 5; + */ ALTER(4, 5), + /** + * ERASE = 6; + */ ERASE(5, 6), + /** + * QUERY = 7; + */ QUERY(6, 7), + /** + * TRUNCATE = 8; + */ TRUNCATE(7, 8), + /** + * RENAME = 9; + */ RENAME(8, 9), + /** + * CINDEX = 10; + * + *
+     **CREATE INDEX*
+     * 
+ */ CINDEX(9, 10), + /** + * DINDEX = 11; + */ DINDEX(10, 11), ; - + + /** + * INSERT = 1; + */ public static final int INSERT_VALUE = 1; + /** + * UPDATE = 2; + */ public static final int UPDATE_VALUE = 2; + /** + * DELETE = 3; + */ public static final int DELETE_VALUE = 3; + /** + * CREATE = 4; + */ public static final int CREATE_VALUE = 4; + /** + * ALTER = 5; + */ public static final int ALTER_VALUE = 5; + /** + * ERASE = 6; + */ public static final int ERASE_VALUE = 6; + /** + * QUERY = 7; + */ public static final int QUERY_VALUE = 7; + /** + * TRUNCATE = 8; + */ public static final int TRUNCATE_VALUE = 8; + /** + * RENAME = 9; + */ public static final int RENAME_VALUE = 9; + /** + * CINDEX = 10; + * + *
+     **CREATE INDEX*
+     * 
+ */ public static final int CINDEX_VALUE = 10; + /** + * DINDEX = 11; + */ public static final int DINDEX_VALUE = 11; - - + + public final int getNumber() { return value; } - + public static EventType valueOf(int value) { switch (value) { case 1: return INSERT; @@ -129,7 +247,7 @@ public final class CanalEntry { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -141,7 +259,7 @@ public final class CanalEntry { return EventType.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -154,11 +272,9 @@ public final class CanalEntry { getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(1); } - - private static final EventType[] VALUES = { - INSERT, UPDATE, DELETE, CREATE, ALTER, ERASE, QUERY, TRUNCATE, RENAME, CINDEX, DINDEX, - }; - + + private static final EventType[] VALUES = values(); + public static EventType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -167,32 +283,57 @@ public final class CanalEntry { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private EventType(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.EventType) } - + + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.Type} + * + *
+   **数据库类型*
+   * 
+ */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * ORACLE = 1; + */ ORACLE(0, 1), + /** + * MYSQL = 2; + */ MYSQL(1, 2), + /** + * PGSQL = 3; + */ PGSQL(2, 3), ; - + + /** + * ORACLE = 1; + */ public static final int ORACLE_VALUE = 1; + /** + * MYSQL = 2; + */ public static final int MYSQL_VALUE = 2; + /** + * PGSQL = 3; + */ public static final int PGSQL_VALUE = 3; - - + + public final int getNumber() { return value; } - + public static Type valueOf(int value) { switch (value) { case 1: return ORACLE; @@ -201,7 +342,7 @@ public final class CanalEntry { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -213,7 +354,7 @@ public final class CanalEntry { return Type.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -226,11 +367,9 @@ public final class CanalEntry { getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(2); } - - private static final Type[] VALUES = { - ORACLE, MYSQL, PGSQL, - }; - + + private static final Type[] VALUES = values(); + public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -239,96 +378,288 @@ public final class CanalEntry { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Type(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.Type) } - - public interface EntryOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional .com.alibaba.otter.canal.protocol.Header header = 1; + + public interface EntryOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Entry) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ boolean hasHeader(); + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader(); + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder(); - - // optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+     **打散后的事件类型*
+     * 
+ */ boolean hasEntryType(); + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+     **打散后的事件类型*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType(); - - // optional bytes storeValue = 3; + + /** + * optional bytes storeValue = 3; + * + *
+     **传输的二进制数组*
+     * 
+ */ boolean hasStoreValue(); + /** + * optional bytes storeValue = 3; + * + *
+     **传输的二进制数组*
+     * 
+ */ com.google.protobuf.ByteString getStoreValue(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} + * + *
+   ****************************************************************
+   * message model
+   *如果要在Enum中新增类型,确保以前的类型的下标值不变.
+   ***************************************************************
+   * 
+ */ public static final class Entry extends - com.google.protobuf.GeneratedMessage - implements EntryOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Entry) + EntryOrBuilder { // Use Entry.newBuilder() to construct. - private Entry(Builder builder) { + private Entry(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Entry(boolean noInit) {} - + 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 final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.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: { + com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = header_.toBuilder(); + } + header_ = input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Header.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(header_); + header_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alibaba.otter.canal.protocol.CanalEntry.EntryType value = com.alibaba.otter.canal.protocol.CanalEntry.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 com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional .com.alibaba.otter.canal.protocol.Header header = 1; public static final int HEADER_FIELD_NUMBER = 1; private com.alibaba.otter.canal.protocol.CanalEntry.Header header_; + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ public boolean hasHeader() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { return header_; } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { return header_; } - - // optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + public static final int ENTRYTYPE_FIELD_NUMBER = 2; private com.alibaba.otter.canal.protocol.CanalEntry.EntryType entryType_; + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+     **打散后的事件类型*
+     * 
+ */ public boolean hasEntryType() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+     **打散后的事件类型*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { return entryType_; } - - // optional bytes storeValue = 3; + public static final int STOREVALUE_FIELD_NUMBER = 3; private com.google.protobuf.ByteString storeValue_; + /** + * optional bytes storeValue = 3; + * + *
+     **传输的二进制数组*
+     * 
+ */ public boolean hasStoreValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional bytes storeValue = 3; + * + *
+     **传输的二进制数组*
+     * 
+ */ public com.google.protobuf.ByteString getStoreValue() { return storeValue_; } - + private void initFields() { header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; @@ -337,12 +668,13 @@ public final class CanalEntry { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -357,12 +689,12 @@ public final class CanalEntry { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -380,113 +712,113 @@ public final class CanalEntry { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } 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 newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } 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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Entry prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( 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中新增类型,确保以前的类型的下标值不变.
+     ***************************************************************
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalEntry.EntryOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Entry) + com.alibaba.otter.canal.protocol.CanalEntry.EntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -498,7 +830,7 @@ public final class CanalEntry { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); if (headerBuilder_ == null) { @@ -513,20 +845,20 @@ public final class CanalEntry { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.Entry.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalEntry.Entry getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalEntry.Entry.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalEntry.Entry build() { com.alibaba.otter.canal.protocol.CanalEntry.Entry result = buildPartial(); if (!result.isInitialized()) { @@ -534,17 +866,7 @@ public final class CanalEntry { } return result; } - - private com.alibaba.otter.canal.protocol.CanalEntry.Entry buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalEntry.Entry result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -569,7 +891,7 @@ public final class CanalEntry { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Entry) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Entry)other); @@ -578,7 +900,7 @@ public final class CanalEntry { 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()) { @@ -593,72 +915,50 @@ public final class CanalEntry { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.Header.newBuilder(); - if (hasHeader()) { - subBuilder.mergeFrom(getHeader()); - } - input.readMessage(subBuilder, extensionRegistry); - setHeader(subBuilder.buildPartial()); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalEntry.EntryType value = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - entryType_ = value; - } - break; - } - case 26: { - bitField0_ |= 0x00000004; - storeValue_ = input.readBytes(); - break; - } + com.alibaba.otter.canal.protocol.CanalEntry.Entry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Entry) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional .com.alibaba.otter.canal.protocol.Header header = 1; + private com.alibaba.otter.canal.protocol.CanalEntry.Header header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< 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; + * + *
+       **协议头部信息*
+       * 
+ */ public boolean hasHeader() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { if (headerBuilder_ == null) { return header_; @@ -666,6 +966,13 @@ public final class CanalEntry { return headerBuilder_.getMessage(); } } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ public Builder setHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { if (headerBuilder_ == null) { if (value == null) { @@ -679,6 +986,13 @@ public final class CanalEntry { bitField0_ |= 0x00000001; return this; } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ public Builder setHeader( com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder builderForValue) { if (headerBuilder_ == null) { @@ -690,6 +1004,13 @@ public final class CanalEntry { bitField0_ |= 0x00000001; return this; } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ public Builder mergeHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { if (headerBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && @@ -706,6 +1027,13 @@ public final class CanalEntry { bitField0_ |= 0x00000001; return this; } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ public Builder clearHeader() { if (headerBuilder_ == null) { header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); @@ -716,11 +1044,25 @@ public final class CanalEntry { bitField0_ = (bitField0_ & ~0x00000001); return this; } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ 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; + * + *
+       **协议头部信息*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { if (headerBuilder_ != null) { return headerBuilder_.getMessageOrBuilder(); @@ -728,28 +1070,55 @@ public final class CanalEntry { return header_; } } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ private com.google.protobuf.SingleFieldBuilder< 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< com.alibaba.otter.canal.protocol.CanalEntry.Header, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder, com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder>( - header_, + getHeader(), getParentForChildren(), isClean()); header_ = null; } return headerBuilder_; } - - // optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + private com.alibaba.otter.canal.protocol.CanalEntry.EntryType entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+       **打散后的事件类型*
+       * 
+ */ public boolean hasEntryType() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+       **打散后的事件类型*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { return entryType_; } + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+       **打散后的事件类型*
+       * 
+ */ public Builder setEntryType(com.alibaba.otter.canal.protocol.CanalEntry.EntryType value) { if (value == null) { throw new NullPointerException(); @@ -759,21 +1128,48 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+       **打散后的事件类型*
+       * 
+ */ public Builder clearEntryType() { bitField0_ = (bitField0_ & ~0x00000002); entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; onChanged(); return this; } - - // optional bytes storeValue = 3; + 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; + * + *
+       **传输的二进制数组*
+       * 
+ */ public com.google.protobuf.ByteString getStoreValue() { return storeValue_; } + /** + * optional bytes storeValue = 3; + * + *
+       **传输的二进制数组*
+       * 
+ */ public Builder setStoreValue(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -783,329 +1179,912 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional bytes storeValue = 3; + * + *
+       **传输的二进制数组*
+       * 
+ */ public Builder clearStoreValue() { bitField0_ = (bitField0_ & ~0x00000004); storeValue_ = getDefaultInstance().getStoreValue(); onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Entry) } - + static { defaultInstance = new Entry(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Entry) } - - public interface HeaderOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int32 version = 1 [default = 1]; + + public interface HeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Header) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 version = 1 [default = 1]; + * + *
+     **协议的版本号*
+     * 
+ */ boolean hasVersion(); + /** + * optional int32 version = 1 [default = 1]; + * + *
+     **协议的版本号*
+     * 
+ */ int getVersion(); - - // optional string logfileName = 2; + + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ boolean hasLogfileName(); - String getLogfileName(); - - // optional int64 logfileOffset = 3; + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + java.lang.String getLogfileName(); + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + com.google.protobuf.ByteString + getLogfileNameBytes(); + + /** + * optional int64 logfileOffset = 3; + * + *
+     **binlog/redolog 文件的偏移位置*
+     * 
+ */ boolean hasLogfileOffset(); + /** + * optional int64 logfileOffset = 3; + * + *
+     **binlog/redolog 文件的偏移位置*
+     * 
+ */ long getLogfileOffset(); - - // optional int64 serverId = 4; + + /** + * optional int64 serverId = 4; + * + *
+     **服务端serverId*
+     * 
+ */ boolean hasServerId(); + /** + * optional int64 serverId = 4; + * + *
+     **服务端serverId*
+     * 
+ */ long getServerId(); - - // optional string serverenCode = 5; + + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ boolean hasServerenCode(); - String getServerenCode(); - - // optional int64 executeTime = 6; + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + java.lang.String getServerenCode(); + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + com.google.protobuf.ByteString + getServerenCodeBytes(); + + /** + * optional int64 executeTime = 6; + * + *
+     **变更数据的执行时间 *
+     * 
+ */ boolean hasExecuteTime(); + /** + * optional int64 executeTime = 6; + * + *
+     **变更数据的执行时间 *
+     * 
+ */ long getExecuteTime(); - - // optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+     ** 变更数据的来源*
+     * 
+ */ boolean hasSourceType(); + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+     ** 变更数据的来源*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType(); - - // optional string schemaName = 8; + + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ boolean hasSchemaName(); - String getSchemaName(); - - // optional string tableName = 9; + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + java.lang.String getSchemaName(); + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + com.google.protobuf.ByteString + getSchemaNameBytes(); + + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ boolean hasTableName(); - String getTableName(); - - // optional int64 eventLength = 10; + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + java.lang.String getTableName(); + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + com.google.protobuf.ByteString + getTableNameBytes(); + + /** + * optional int64 eventLength = 10; + * + *
+     **每个event的长度*
+     * 
+ */ boolean hasEventLength(); + /** + * optional int64 eventLength = 10; + * + *
+     **每个event的长度*
+     * 
+ */ long getEventLength(); - - // optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ boolean hasEventType(); + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ 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 getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ java.util.List getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Header} + * + *
+   **message Header*
+   * 
+ */ public static final class Header extends - com.google.protobuf.GeneratedMessage - implements HeaderOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Header) + HeaderOrBuilder { // Use Header.newBuilder() to construct. - private Header(Builder builder) { + private Header(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Header(boolean noInit) {} - + private Header(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final Header defaultInstance; public static Header getDefaultInstance() { return defaultInstance; } - + public Header getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + 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(); + com.alibaba.otter.canal.protocol.CanalEntry.Type value = com.alibaba.otter.canal.protocol.CanalEntry.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(); + com.alibaba.otter.canal.protocol.CanalEntry.EventType value = com.alibaba.otter.canal.protocol.CanalEntry.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(com.alibaba.otter.canal.protocol.CanalEntry.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_ & 0x00000800) == 0x00000800)) { + props_ = java.util.Collections.unmodifiableList(props_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } 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; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + com.alibaba.otter.canal.protocol.CanalEntry.Header.class, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder.class); } - + + 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); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + private int bitField0_; - // optional int32 version = 1 [default = 1]; public static final int VERSION_FIELD_NUMBER = 1; private int version_; + /** + * optional int32 version = 1 [default = 1]; + * + *
+     **协议的版本号*
+     * 
+ */ public boolean hasVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 version = 1 [default = 1]; + * + *
+     **协议的版本号*
+     * 
+ */ public int getVersion() { return version_; } - - // optional string logfileName = 2; + public static final int LOGFILENAME_FIELD_NUMBER = 2; private java.lang.Object logfileName_; + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ public boolean hasLogfileName() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getLogfileName() { + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + public java.lang.String getLogfileName() { java.lang.Object ref = logfileName_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { logfileName_ = s; } return s; } } - private com.google.protobuf.ByteString getLogfileNameBytes() { + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + public com.google.protobuf.ByteString + getLogfileNameBytes() { java.lang.Object ref = logfileName_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); logfileName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional int64 logfileOffset = 3; + public static final int LOGFILEOFFSET_FIELD_NUMBER = 3; private long logfileOffset_; + /** + * optional int64 logfileOffset = 3; + * + *
+     **binlog/redolog 文件的偏移位置*
+     * 
+ */ public boolean hasLogfileOffset() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int64 logfileOffset = 3; + * + *
+     **binlog/redolog 文件的偏移位置*
+     * 
+ */ public long getLogfileOffset() { return logfileOffset_; } - - // optional int64 serverId = 4; + public static final int SERVERID_FIELD_NUMBER = 4; private long serverId_; + /** + * optional int64 serverId = 4; + * + *
+     **服务端serverId*
+     * 
+ */ public boolean hasServerId() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional int64 serverId = 4; + * + *
+     **服务端serverId*
+     * 
+ */ public long getServerId() { return serverId_; } - - // optional string serverenCode = 5; + public static final int SERVERENCODE_FIELD_NUMBER = 5; private java.lang.Object serverenCode_; + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ public boolean hasServerenCode() { return ((bitField0_ & 0x00000010) == 0x00000010); } - public String getServerenCode() { + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + public java.lang.String getServerenCode() { java.lang.Object ref = serverenCode_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { serverenCode_ = s; } return s; } } - private com.google.protobuf.ByteString getServerenCodeBytes() { + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + public com.google.protobuf.ByteString + getServerenCodeBytes() { java.lang.Object ref = serverenCode_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); serverenCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional int64 executeTime = 6; + public static final int EXECUTETIME_FIELD_NUMBER = 6; private long executeTime_; + /** + * optional int64 executeTime = 6; + * + *
+     **变更数据的执行时间 *
+     * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional int64 executeTime = 6; + * + *
+     **变更数据的执行时间 *
+     * 
+ */ public long getExecuteTime() { return executeTime_; } - - // optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + public static final int SOURCETYPE_FIELD_NUMBER = 7; private com.alibaba.otter.canal.protocol.CanalEntry.Type sourceType_; + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+     ** 变更数据的来源*
+     * 
+ */ public boolean hasSourceType() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+     ** 变更数据的来源*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { return sourceType_; } - - // optional string schemaName = 8; + public static final int SCHEMANAME_FIELD_NUMBER = 8; private java.lang.Object schemaName_; + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ public boolean hasSchemaName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - public String getSchemaName() { + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + public java.lang.String getSchemaName() { java.lang.Object ref = schemaName_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { schemaName_ = s; } return s; } } - private com.google.protobuf.ByteString getSchemaNameBytes() { + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + public com.google.protobuf.ByteString + getSchemaNameBytes() { java.lang.Object ref = schemaName_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); schemaName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string tableName = 9; + public static final int TABLENAME_FIELD_NUMBER = 9; private java.lang.Object tableName_; + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ public boolean hasTableName() { return ((bitField0_ & 0x00000100) == 0x00000100); } - public String getTableName() { + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + public java.lang.String getTableName() { java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { tableName_ = s; } return s; } } - private com.google.protobuf.ByteString getTableNameBytes() { + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + public com.google.protobuf.ByteString + getTableNameBytes() { java.lang.Object ref = tableName_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); tableName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional int64 eventLength = 10; + public static final int EVENTLENGTH_FIELD_NUMBER = 10; private long eventLength_; + /** + * optional int64 eventLength = 10; + * + *
+     **每个event的长度*
+     * 
+ */ public boolean hasEventLength() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** + * optional int64 eventLength = 10; + * + *
+     **每个event的长度*
+     * 
+ */ public long getEventLength() { return eventLength_; } - - // optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + public static final int EVENTTYPE_FIELD_NUMBER = 11; private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_; + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ public boolean hasEventType() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { return eventType_; } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + public static final int PROPS_FIELD_NUMBER = 12; private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ public int getPropsCount() { return props_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } - + private void initFields() { version_ = 1; logfileName_ = ""; @@ -1123,12 +2102,13 @@ public final class CanalEntry { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -1170,12 +2150,12 @@ public final class CanalEntry { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -1229,113 +2209,110 @@ public final class CanalEntry { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } 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 newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } 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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Header prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Header} + * + *
+     **message Header*
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Header) + com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder { 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; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -1347,7 +2324,7 @@ public final class CanalEntry { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); version_ = 1; @@ -1380,20 +2357,20 @@ public final class CanalEntry { } return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.Header.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalEntry.Header getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalEntry.Header build() { com.alibaba.otter.canal.protocol.CanalEntry.Header result = buildPartial(); if (!result.isInitialized()) { @@ -1401,17 +2378,7 @@ public final class CanalEntry { } return result; } - - private com.alibaba.otter.canal.protocol.CanalEntry.Header buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalEntry.Header result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -1473,7 +2440,7 @@ public final class CanalEntry { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Header) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Header)other); @@ -1482,14 +2449,16 @@ public final class CanalEntry { return this; } } - + 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.hasVersion()) { setVersion(other.getVersion()); } if (other.hasLogfileName()) { - setLogfileName(other.getLogfileName()); + bitField0_ |= 0x00000002; + logfileName_ = other.logfileName_; + onChanged(); } if (other.hasLogfileOffset()) { setLogfileOffset(other.getLogfileOffset()); @@ -1498,7 +2467,9 @@ public final class CanalEntry { setServerId(other.getServerId()); } if (other.hasServerenCode()) { - setServerenCode(other.getServerenCode()); + bitField0_ |= 0x00000010; + serverenCode_ = other.serverenCode_; + onChanged(); } if (other.hasExecuteTime()) { setExecuteTime(other.getExecuteTime()); @@ -1507,10 +2478,14 @@ public final class CanalEntry { setSourceType(other.getSourceType()); } if (other.hasSchemaName()) { - setSchemaName(other.getSchemaName()); + bitField0_ |= 0x00000080; + schemaName_ = other.schemaName_; + onChanged(); } if (other.hasTableName()) { - setTableName(other.getTableName()); + bitField0_ |= 0x00000100; + tableName_ = other.tableName_; + onChanged(); } if (other.hasEventLength()) { setEventLength(other.getEventLength()); @@ -1547,150 +2522,139 @@ public final class CanalEntry { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - version_ = input.readInt32(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - logfileName_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - logfileOffset_ = input.readInt64(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - serverId_ = input.readInt64(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - serverenCode_ = input.readBytes(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - executeTime_ = input.readInt64(); - break; - } - case 56: { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalEntry.Type value = com.alibaba.otter.canal.protocol.CanalEntry.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(7, rawValue); - } else { - bitField0_ |= 0x00000040; - sourceType_ = value; - } - break; - } - case 66: { - bitField0_ |= 0x00000080; - schemaName_ = input.readBytes(); - break; - } - case 74: { - bitField0_ |= 0x00000100; - tableName_ = input.readBytes(); - break; - } - case 80: { - bitField0_ |= 0x00000200; - eventLength_ = input.readInt64(); - break; - } - case 88: { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalEntry.EventType value = com.alibaba.otter.canal.protocol.CanalEntry.EventType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(11, rawValue); - } else { - bitField0_ |= 0x00000400; - eventType_ = value; - } - break; - } - case 98: { - com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.Pair.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addProps(subBuilder.buildPartial()); - break; - } + com.alibaba.otter.canal.protocol.CanalEntry.Header parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Header) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional int32 version = 1 [default = 1]; + private int version_ = 1; + /** + * optional int32 version = 1 [default = 1]; + * + *
+       **协议的版本号*
+       * 
+ */ public boolean hasVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 version = 1 [default = 1]; + * + *
+       **协议的版本号*
+       * 
+ */ public int getVersion() { return version_; } + /** + * optional int32 version = 1 [default = 1]; + * + *
+       **协议的版本号*
+       * 
+ */ public Builder setVersion(int value) { bitField0_ |= 0x00000001; version_ = value; onChanged(); return this; } + /** + * optional int32 version = 1 [default = 1]; + * + *
+       **协议的版本号*
+       * 
+ */ public Builder clearVersion() { bitField0_ = (bitField0_ & ~0x00000001); version_ = 1; onChanged(); return this; } - - // optional string logfileName = 2; + private java.lang.Object logfileName_ = ""; + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ public boolean hasLogfileName() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getLogfileName() { + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public java.lang.String getLogfileName() { java.lang.Object ref = logfileName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - logfileName_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + logfileName_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setLogfileName(String value) { + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public com.google.protobuf.ByteString + getLogfileNameBytes() { + java.lang.Object ref = logfileName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logfileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public Builder setLogfileName( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -1699,76 +2663,194 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ public Builder clearLogfileName() { bitField0_ = (bitField0_ & ~0x00000002); logfileName_ = getDefaultInstance().getLogfileName(); onChanged(); return this; } - void setLogfileName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public Builder setLogfileNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; logfileName_ = value; onChanged(); + return this; } - - // optional int64 logfileOffset = 3; + private long logfileOffset_ ; + /** + * optional int64 logfileOffset = 3; + * + *
+       **binlog/redolog 文件的偏移位置*
+       * 
+ */ public boolean hasLogfileOffset() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int64 logfileOffset = 3; + * + *
+       **binlog/redolog 文件的偏移位置*
+       * 
+ */ public long getLogfileOffset() { return logfileOffset_; } + /** + * optional int64 logfileOffset = 3; + * + *
+       **binlog/redolog 文件的偏移位置*
+       * 
+ */ public Builder setLogfileOffset(long value) { bitField0_ |= 0x00000004; logfileOffset_ = value; onChanged(); return this; } + /** + * optional int64 logfileOffset = 3; + * + *
+       **binlog/redolog 文件的偏移位置*
+       * 
+ */ public Builder clearLogfileOffset() { bitField0_ = (bitField0_ & ~0x00000004); logfileOffset_ = 0L; onChanged(); return this; } - - // optional int64 serverId = 4; + private long serverId_ ; + /** + * optional int64 serverId = 4; + * + *
+       **服务端serverId*
+       * 
+ */ public boolean hasServerId() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional int64 serverId = 4; + * + *
+       **服务端serverId*
+       * 
+ */ public long getServerId() { return serverId_; } + /** + * optional int64 serverId = 4; + * + *
+       **服务端serverId*
+       * 
+ */ public Builder setServerId(long value) { bitField0_ |= 0x00000008; serverId_ = value; onChanged(); return this; } + /** + * optional int64 serverId = 4; + * + *
+       **服务端serverId*
+       * 
+ */ public Builder clearServerId() { bitField0_ = (bitField0_ & ~0x00000008); serverId_ = 0L; onChanged(); return this; } - - // optional string serverenCode = 5; + private java.lang.Object serverenCode_ = ""; + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ public boolean hasServerenCode() { return ((bitField0_ & 0x00000010) == 0x00000010); } - public String getServerenCode() { + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public java.lang.String getServerenCode() { java.lang.Object ref = serverenCode_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - serverenCode_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + serverenCode_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setServerenCode(String value) { + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public com.google.protobuf.ByteString + getServerenCodeBytes() { + java.lang.Object ref = serverenCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serverenCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public Builder setServerenCode( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -1777,47 +2859,113 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ public Builder clearServerenCode() { bitField0_ = (bitField0_ & ~0x00000010); serverenCode_ = getDefaultInstance().getServerenCode(); onChanged(); return this; } - void setServerenCode(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000010; + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public Builder setServerenCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; serverenCode_ = value; onChanged(); + return this; } - - // optional int64 executeTime = 6; + private long executeTime_ ; + /** + * optional int64 executeTime = 6; + * + *
+       **变更数据的执行时间 *
+       * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional int64 executeTime = 6; + * + *
+       **变更数据的执行时间 *
+       * 
+ */ public long getExecuteTime() { return executeTime_; } + /** + * optional int64 executeTime = 6; + * + *
+       **变更数据的执行时间 *
+       * 
+ */ public Builder setExecuteTime(long value) { bitField0_ |= 0x00000020; executeTime_ = value; onChanged(); return this; } + /** + * optional int64 executeTime = 6; + * + *
+       **变更数据的执行时间 *
+       * 
+ */ public Builder clearExecuteTime() { bitField0_ = (bitField0_ & ~0x00000020); executeTime_ = 0L; onChanged(); return this; } - - // optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + private com.alibaba.otter.canal.protocol.CanalEntry.Type sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+       ** 变更数据的来源*
+       * 
+ */ public boolean hasSourceType() { return ((bitField0_ & 0x00000040) == 0x00000040); } + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+       ** 变更数据的来源*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { return sourceType_; } + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+       ** 变更数据的来源*
+       * 
+ */ public Builder setSourceType(com.alibaba.otter.canal.protocol.CanalEntry.Type value) { if (value == null) { throw new NullPointerException(); @@ -1827,29 +2975,81 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+       ** 变更数据的来源*
+       * 
+ */ public Builder clearSourceType() { bitField0_ = (bitField0_ & ~0x00000040); sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; onChanged(); return this; } - - // optional string schemaName = 8; + private java.lang.Object schemaName_ = ""; + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ public boolean hasSchemaName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - public String getSchemaName() { + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public java.lang.String getSchemaName() { java.lang.Object ref = schemaName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - schemaName_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + schemaName_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setSchemaName(String value) { + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public com.google.protobuf.ByteString + getSchemaNameBytes() { + java.lang.Object ref = schemaName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public Builder setSchemaName( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -1858,34 +3058,98 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ public Builder clearSchemaName() { bitField0_ = (bitField0_ & ~0x00000080); schemaName_ = getDefaultInstance().getSchemaName(); onChanged(); return this; } - void setSchemaName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000080; + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public Builder setSchemaNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; schemaName_ = value; onChanged(); + return this; } - - // optional string tableName = 9; + private java.lang.Object tableName_ = ""; + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ public boolean hasTableName() { return ((bitField0_ & 0x00000100) == 0x00000100); } - public String getTableName() { + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public java.lang.String getTableName() { java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setTableName(String value) { + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public Builder setTableName( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -1894,47 +3158,113 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ public Builder clearTableName() { bitField0_ = (bitField0_ & ~0x00000100); tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000100; + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; tableName_ = value; onChanged(); + return this; } - - // optional int64 eventLength = 10; + private long eventLength_ ; + /** + * optional int64 eventLength = 10; + * + *
+       **每个event的长度*
+       * 
+ */ public boolean hasEventLength() { return ((bitField0_ & 0x00000200) == 0x00000200); } + /** + * optional int64 eventLength = 10; + * + *
+       **每个event的长度*
+       * 
+ */ public long getEventLength() { return eventLength_; } + /** + * optional int64 eventLength = 10; + * + *
+       **每个event的长度*
+       * 
+ */ public Builder setEventLength(long value) { bitField0_ |= 0x00000200; eventLength_ = value; onChanged(); return this; } + /** + * optional int64 eventLength = 10; + * + *
+       **每个event的长度*
+       * 
+ */ public Builder clearEventLength() { bitField0_ = (bitField0_ & ~0x00000200); eventLength_ = 0L; onChanged(); return this; } - - // optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ public boolean hasEventType() { return ((bitField0_ & 0x00000400) == 0x00000400); } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { return eventType_; } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { if (value == null) { throw new NullPointerException(); @@ -1944,14 +3274,20 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ public Builder clearEventType() { bitField0_ = (bitField0_ & ~0x00000400); eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; onChanged(); return this; } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { @@ -1960,10 +3296,17 @@ public final class CanalEntry { bitField0_ |= 0x00000800; } } - + private com.google.protobuf.RepeatedFieldBuilder< 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; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -1971,6 +3314,13 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -1978,6 +3328,13 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -1985,6 +3342,13 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -1999,6 +3363,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -2010,6 +3381,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -2023,6 +3401,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -2037,6 +3422,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -2048,6 +3440,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -2059,17 +3458,32 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); - super.addAll(values, props_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); onChanged(); } else { propsBuilder_.addAllMessages(values); } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -2080,6 +3494,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -2090,10 +3511,24 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ 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; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -2101,6 +3536,13 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -2109,15 +3551,36 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -2136,273 +3599,756 @@ public final class CanalEntry { } return propsBuilder_; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Header) } - + static { defaultInstance = new Header(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Header) } - - public interface ColumnOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int32 index = 1; + + public interface ColumnOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Column) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 index = 1; + * + *
+     **字段下标*
+     * 
+ */ boolean hasIndex(); + /** + * optional int32 index = 1; + * + *
+     **字段下标*
+     * 
+ */ int getIndex(); - - // optional int32 sqlType = 2; + + /** + * optional int32 sqlType = 2; + * + *
+     **字段java中类型*
+     * 
+ */ boolean hasSqlType(); + /** + * optional int32 sqlType = 2; + * + *
+     **字段java中类型*
+     * 
+ */ int getSqlType(); - - // optional string name = 3; + + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ boolean hasName(); - String getName(); - - // optional bool isKey = 4; + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + java.lang.String getName(); + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional bool isKey = 4; + * + *
+     **是否是主键*
+     * 
+ */ boolean hasIsKey(); + /** + * optional bool isKey = 4; + * + *
+     **是否是主键*
+     * 
+ */ boolean getIsKey(); - - // optional bool updated = 5; + + /** + * optional bool updated = 5; + * + *
+     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * 
+ */ boolean hasUpdated(); + /** + * optional bool updated = 5; + * + *
+     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * 
+ */ boolean getUpdated(); - - // optional bool isNull = 6 [default = false]; + + /** + * optional bool isNull = 6 [default = false]; + * + *
+     ** 标识是否为空  *
+     * 
+ */ boolean hasIsNull(); + /** + * optional bool isNull = 6 [default = false]; + * + *
+     ** 标识是否为空  *
+     * 
+ */ boolean getIsNull(); - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ java.util.List getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ java.util.List getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); - - // optional string value = 8; + + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ boolean hasValue(); - String getValue(); - - // optional int32 length = 9; + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + java.lang.String getValue(); + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + * optional int32 length = 9; + * + *
+     ** 对应数据对象原始长度 *
+     * 
+ */ boolean hasLength(); + /** + * optional int32 length = 9; + * + *
+     ** 对应数据对象原始长度 *
+     * 
+ */ int getLength(); - - // optional string mysqlType = 10; + + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ boolean hasMysqlType(); - String getMysqlType(); + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + java.lang.String getMysqlType(); + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + com.google.protobuf.ByteString + getMysqlTypeBytes(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} + * + *
+   **每个字段的数据结构*
+   * 
+ */ public static final class Column extends - com.google.protobuf.GeneratedMessage - implements ColumnOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Column) + ColumnOrBuilder { // Use Column.newBuilder() to construct. - private Column(Builder builder) { + private Column(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Column(boolean noInit) {} - + 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; + @java.lang.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(com.alibaba.otter.canal.protocol.CanalEntry.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(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional int32 index = 1; public static final int INDEX_FIELD_NUMBER = 1; private int index_; + /** + * optional int32 index = 1; + * + *
+     **字段下标*
+     * 
+ */ public boolean hasIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 index = 1; + * + *
+     **字段下标*
+     * 
+ */ public int getIndex() { return index_; } - - // optional int32 sqlType = 2; + public static final int SQLTYPE_FIELD_NUMBER = 2; private int sqlType_; + /** + * optional int32 sqlType = 2; + * + *
+     **字段java中类型*
+     * 
+ */ public boolean hasSqlType() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional int32 sqlType = 2; + * + *
+     **字段java中类型*
+     * 
+ */ public int getSqlType() { return sqlType_; } - - // optional string name = 3; + public static final int NAME_FIELD_NUMBER = 3; private java.lang.Object name_; + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ public boolean hasName() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getName() { + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + public java.lang.String getName() { java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { name_ = s; } return s; } } - private com.google.protobuf.ByteString getNameBytes() { + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { java.lang.Object ref = name_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional bool isKey = 4; + public static final int ISKEY_FIELD_NUMBER = 4; private boolean isKey_; + /** + * optional bool isKey = 4; + * + *
+     **是否是主键*
+     * 
+ */ public boolean hasIsKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional bool isKey = 4; + * + *
+     **是否是主键*
+     * 
+ */ public boolean getIsKey() { return isKey_; } - - // optional bool updated = 5; + public static final int UPDATED_FIELD_NUMBER = 5; private boolean updated_; + /** + * optional bool updated = 5; + * + *
+     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * 
+ */ public boolean hasUpdated() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional bool updated = 5; + * + *
+     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * 
+ */ public boolean getUpdated() { return updated_; } - - // optional bool isNull = 6 [default = false]; + public static final int ISNULL_FIELD_NUMBER = 6; private boolean isNull_; + /** + * optional bool isNull = 6 [default = false]; + * + *
+     ** 标识是否为空  *
+     * 
+ */ public boolean hasIsNull() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional bool isNull = 6 [default = false]; + * + *
+     ** 标识是否为空  *
+     * 
+ */ public boolean getIsNull() { return isNull_; } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + public static final int PROPS_FIELD_NUMBER = 7; private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ public int getPropsCount() { return props_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } - - // optional string value = 8; + public static final int VALUE_FIELD_NUMBER = 8; private java.lang.Object value_; + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ public boolean hasValue() { return ((bitField0_ & 0x00000040) == 0x00000040); } - public String getValue() { + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + public java.lang.String getValue() { java.lang.Object ref = value_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { value_ = s; } return s; } } - private com.google.protobuf.ByteString getValueBytes() { + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + public com.google.protobuf.ByteString + getValueBytes() { java.lang.Object ref = value_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional int32 length = 9; + public static final int LENGTH_FIELD_NUMBER = 9; private int length_; + /** + * optional int32 length = 9; + * + *
+     ** 对应数据对象原始长度 *
+     * 
+ */ public boolean hasLength() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** + * optional int32 length = 9; + * + *
+     ** 对应数据对象原始长度 *
+     * 
+ */ public int getLength() { return length_; } - - // optional string mysqlType = 10; + public static final int MYSQLTYPE_FIELD_NUMBER = 10; private java.lang.Object mysqlType_; + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ public boolean hasMysqlType() { return ((bitField0_ & 0x00000100) == 0x00000100); } - public String getMysqlType() { + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + public java.lang.String getMysqlType() { java.lang.Object ref = mysqlType_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { mysqlType_ = s; } return s; } } - private com.google.protobuf.ByteString getMysqlTypeBytes() { + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + public com.google.protobuf.ByteString + getMysqlTypeBytes() { java.lang.Object ref = mysqlType_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); mysqlType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + private void initFields() { index_ = 0; sqlType_ = 0; @@ -2418,12 +4364,13 @@ public final class CanalEntry { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -2459,12 +4406,12 @@ public final class CanalEntry { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -2510,113 +4457,110 @@ public final class CanalEntry { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } 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 newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } 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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Column prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} + * + *
+     **每个字段的数据结构*
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Column) + com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -2628,7 +4572,7 @@ public final class CanalEntry { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); index_ = 0; @@ -2657,20 +4601,20 @@ public final class CanalEntry { bitField0_ = (bitField0_ & ~0x00000200); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.Column.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalEntry.Column getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalEntry.Column build() { com.alibaba.otter.canal.protocol.CanalEntry.Column result = buildPartial(); if (!result.isInitialized()) { @@ -2678,17 +4622,7 @@ public final class CanalEntry { } return result; } - - private com.alibaba.otter.canal.protocol.CanalEntry.Column buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalEntry.Column result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -2742,7 +4676,7 @@ public final class CanalEntry { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Column) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Column)other); @@ -2751,7 +4685,7 @@ public final class CanalEntry { return this; } } - + 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.hasIndex()) { @@ -2761,7 +4695,9 @@ public final class CanalEntry { setSqlType(other.getSqlType()); } if (other.hasName()) { - setName(other.getName()); + bitField0_ |= 0x00000004; + name_ = other.name_; + onChanged(); } if (other.hasIsKey()) { setIsKey(other.getIsKey()); @@ -2799,160 +4735,202 @@ public final class CanalEntry { } } if (other.hasValue()) { - setValue(other.getValue()); + bitField0_ |= 0x00000080; + value_ = other.value_; + onChanged(); } if (other.hasLength()) { setLength(other.getLength()); } if (other.hasMysqlType()) { - setMysqlType(other.getMysqlType()); + bitField0_ |= 0x00000200; + mysqlType_ = other.mysqlType_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - index_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - sqlType_ = input.readInt32(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - name_ = input.readBytes(); - 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: { - com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.Pair.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addProps(subBuilder.buildPartial()); - break; - } - case 66: { - bitField0_ |= 0x00000080; - value_ = input.readBytes(); - break; - } - case 72: { - bitField0_ |= 0x00000100; - length_ = input.readInt32(); - break; - } - case 82: { - bitField0_ |= 0x00000200; - mysqlType_ = input.readBytes(); - break; - } + com.alibaba.otter.canal.protocol.CanalEntry.Column parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Column) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional int32 index = 1; + private int index_ ; + /** + * optional int32 index = 1; + * + *
+       **字段下标*
+       * 
+ */ public boolean hasIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 index = 1; + * + *
+       **字段下标*
+       * 
+ */ public int getIndex() { return index_; } + /** + * optional int32 index = 1; + * + *
+       **字段下标*
+       * 
+ */ public Builder setIndex(int value) { bitField0_ |= 0x00000001; index_ = value; onChanged(); return this; } + /** + * optional int32 index = 1; + * + *
+       **字段下标*
+       * 
+ */ public Builder clearIndex() { bitField0_ = (bitField0_ & ~0x00000001); index_ = 0; onChanged(); return this; } - - // optional int32 sqlType = 2; + private int sqlType_ ; + /** + * optional int32 sqlType = 2; + * + *
+       **字段java中类型*
+       * 
+ */ public boolean hasSqlType() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional int32 sqlType = 2; + * + *
+       **字段java中类型*
+       * 
+ */ public int getSqlType() { return sqlType_; } + /** + * optional int32 sqlType = 2; + * + *
+       **字段java中类型*
+       * 
+ */ public Builder setSqlType(int value) { bitField0_ |= 0x00000002; sqlType_ = value; onChanged(); return this; } + /** + * optional int32 sqlType = 2; + * + *
+       **字段java中类型*
+       * 
+ */ public Builder clearSqlType() { bitField0_ = (bitField0_ & ~0x00000002); sqlType_ = 0; onChanged(); return this; } - - // optional string name = 3; + private java.lang.Object name_ = ""; + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ public boolean hasName() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getName() { + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public java.lang.String getName() { java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setName(String value) { + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public Builder setName( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -2961,82 +4939,181 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000004); name_ = getDefaultInstance().getName(); onChanged(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; name_ = value; onChanged(); + return this; } - - // optional bool isKey = 4; + private boolean isKey_ ; + /** + * optional bool isKey = 4; + * + *
+       **是否是主键*
+       * 
+ */ public boolean hasIsKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional bool isKey = 4; + * + *
+       **是否是主键*
+       * 
+ */ public boolean getIsKey() { return isKey_; } + /** + * optional bool isKey = 4; + * + *
+       **是否是主键*
+       * 
+ */ public Builder setIsKey(boolean value) { bitField0_ |= 0x00000008; isKey_ = value; onChanged(); return this; } + /** + * optional bool isKey = 4; + * + *
+       **是否是主键*
+       * 
+ */ public Builder clearIsKey() { bitField0_ = (bitField0_ & ~0x00000008); isKey_ = false; onChanged(); return this; } - - // optional bool updated = 5; + private boolean updated_ ; + /** + * optional bool updated = 5; + * + *
+       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * 
+ */ public boolean hasUpdated() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional bool updated = 5; + * + *
+       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * 
+ */ public boolean getUpdated() { return updated_; } + /** + * optional bool updated = 5; + * + *
+       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * 
+ */ public Builder setUpdated(boolean value) { bitField0_ |= 0x00000010; updated_ = value; onChanged(); return this; } + /** + * optional bool updated = 5; + * + *
+       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * 
+ */ public Builder clearUpdated() { bitField0_ = (bitField0_ & ~0x00000010); updated_ = false; onChanged(); return this; } - - // optional bool isNull = 6 [default = false]; + private boolean isNull_ ; + /** + * optional bool isNull = 6 [default = false]; + * + *
+       ** 标识是否为空  *
+       * 
+ */ public boolean hasIsNull() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional bool isNull = 6 [default = false]; + * + *
+       ** 标识是否为空  *
+       * 
+ */ public boolean getIsNull() { return isNull_; } + /** + * optional bool isNull = 6 [default = false]; + * + *
+       ** 标识是否为空  *
+       * 
+ */ public Builder setIsNull(boolean value) { bitField0_ |= 0x00000020; isNull_ = value; onChanged(); return this; } + /** + * optional bool isNull = 6 [default = false]; + * + *
+       ** 标识是否为空  *
+       * 
+ */ public Builder clearIsNull() { bitField0_ = (bitField0_ & ~0x00000020); isNull_ = false; onChanged(); return this; } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { @@ -3045,10 +5122,17 @@ public final class CanalEntry { bitField0_ |= 0x00000040; } } - + private com.google.protobuf.RepeatedFieldBuilder< 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; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -3056,6 +5140,13 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -3063,6 +5154,13 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -3070,6 +5168,13 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -3084,6 +5189,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -3095,6 +5207,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -3108,6 +5227,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -3122,6 +5248,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -3133,6 +5266,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -3144,17 +5284,32 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); - super.addAll(values, props_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); onChanged(); } else { propsBuilder_.addAllMessages(values); } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -3165,6 +5320,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -3175,10 +5337,24 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ 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; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -3186,6 +5362,13 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -3194,15 +5377,36 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -3221,23 +5425,68 @@ public final class CanalEntry { } return propsBuilder_; } - - // optional string value = 8; + private java.lang.Object value_ = ""; + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ public boolean hasValue() { return ((bitField0_ & 0x00000080) == 0x00000080); } - public String getValue() { + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public java.lang.String getValue() { java.lang.Object ref = value_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - value_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setValue(String value) { + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public Builder setValue( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -3246,55 +5495,146 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000080); value_ = getDefaultInstance().getValue(); onChanged(); return this; } - void setValue(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000080; + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; value_ = value; onChanged(); + return this; } - - // optional int32 length = 9; + private int length_ ; + /** + * optional int32 length = 9; + * + *
+       ** 对应数据对象原始长度 *
+       * 
+ */ public boolean hasLength() { return ((bitField0_ & 0x00000100) == 0x00000100); } + /** + * optional int32 length = 9; + * + *
+       ** 对应数据对象原始长度 *
+       * 
+ */ public int getLength() { return length_; } + /** + * optional int32 length = 9; + * + *
+       ** 对应数据对象原始长度 *
+       * 
+ */ public Builder setLength(int value) { bitField0_ |= 0x00000100; length_ = value; onChanged(); return this; } + /** + * optional int32 length = 9; + * + *
+       ** 对应数据对象原始长度 *
+       * 
+ */ public Builder clearLength() { bitField0_ = (bitField0_ & ~0x00000100); length_ = 0; onChanged(); return this; } - - // optional string mysqlType = 10; + private java.lang.Object mysqlType_ = ""; + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ public boolean hasMysqlType() { return ((bitField0_ & 0x00000200) == 0x00000200); } - public String getMysqlType() { + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public java.lang.String getMysqlType() { java.lang.Object ref = mysqlType_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - mysqlType_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + mysqlType_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setMysqlType(String value) { + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public com.google.protobuf.ByteString + getMysqlTypeBytes() { + java.lang.Object ref = mysqlType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mysqlType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public Builder setMysqlType( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -3303,153 +5643,473 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ public Builder clearMysqlType() { bitField0_ = (bitField0_ & ~0x00000200); mysqlType_ = getDefaultInstance().getMysqlType(); onChanged(); return this; } - void setMysqlType(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000200; + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public Builder setMysqlTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; mysqlType_ = value; onChanged(); + return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Column) } - + static { defaultInstance = new Column(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Column) } - - public interface RowDataOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + + public interface RowDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.RowData) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ java.util.List getBeforeColumnsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ int getBeforeColumnsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ java.util.List getBeforeColumnsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ 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 getAfterColumnsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ int getAfterColumnsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ java.util.List getAfterColumnsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ 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 getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ java.util.List getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowData} + */ public static final class RowData extends - com.google.protobuf.GeneratedMessage - implements RowDataOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowData) + RowDataOrBuilder { // Use RowData.newBuilder() to construct. - private RowData(Builder builder) { + private RowData(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private RowData(boolean noInit) {} - + 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 final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.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(com.alibaba.otter.canal.protocol.CanalEntry.Column.PARSER, extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + afterColumns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + afterColumns_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Column.PARSER, extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + props_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.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 com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + com.alibaba.otter.canal.protocol.CanalEntry.RowData.class, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder.class); } - - // repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + + 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); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + public static final int BEFORECOLUMNS_FIELD_NUMBER = 1; private java.util.List beforeColumns_; + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ public java.util.List getBeforeColumnsList() { return beforeColumns_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ public java.util.List getBeforeColumnsOrBuilderList() { return beforeColumns_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ public int getBeforeColumnsCount() { return beforeColumns_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { return beforeColumns_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( int index) { return beforeColumns_.get(index); } - - // repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + public static final int AFTERCOLUMNS_FIELD_NUMBER = 2; private java.util.List afterColumns_; + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ public java.util.List getAfterColumnsList() { return afterColumns_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ public java.util.List getAfterColumnsOrBuilderList() { return afterColumns_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ public int getAfterColumnsCount() { return afterColumns_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { return afterColumns_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( int index) { return afterColumns_.get(index); } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + public static final int PROPS_FIELD_NUMBER = 3; private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public int getPropsCount() { return props_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ 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(); @@ -3458,12 +6118,13 @@ public final class CanalEntry { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -3478,12 +6139,12 @@ public final class CanalEntry { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; for (int i = 0; i < beforeColumns_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -3501,113 +6162,106 @@ public final class CanalEntry { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } 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 newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } 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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.RowData prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowData} + */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.RowData) + com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -3621,7 +6275,7 @@ public final class CanalEntry { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); if (beforeColumnsBuilder_ == null) { @@ -3644,20 +6298,20 @@ public final class CanalEntry { } return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalEntry.RowData getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalEntry.RowData build() { com.alibaba.otter.canal.protocol.CanalEntry.RowData result = buildPartial(); if (!result.isInitialized()) { @@ -3665,17 +6319,7 @@ public final class CanalEntry { } return result; } - - private com.alibaba.otter.canal.protocol.CanalEntry.RowData buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalEntry.RowData result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -3709,7 +6353,7 @@ public final class CanalEntry { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowData) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.RowData)other); @@ -3718,7 +6362,7 @@ public final class CanalEntry { 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) { @@ -3802,59 +6446,30 @@ public final class CanalEntry { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.Column.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addBeforeColumns(subBuilder.buildPartial()); - break; - } - case 18: { - com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.Column.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addAfterColumns(subBuilder.buildPartial()); - break; - } - case 26: { - com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.Pair.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addProps(subBuilder.buildPartial()); - break; - } + com.alibaba.otter.canal.protocol.CanalEntry.RowData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.RowData) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + private java.util.List beforeColumns_ = java.util.Collections.emptyList(); private void ensureBeforeColumnsIsMutable() { @@ -3863,10 +6478,17 @@ public final class CanalEntry { bitField0_ |= 0x00000001; } } - + private com.google.protobuf.RepeatedFieldBuilder< 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; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public java.util.List getBeforeColumnsList() { if (beforeColumnsBuilder_ == null) { return java.util.Collections.unmodifiableList(beforeColumns_); @@ -3874,6 +6496,13 @@ public final class CanalEntry { return beforeColumnsBuilder_.getMessageList(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public int getBeforeColumnsCount() { if (beforeColumnsBuilder_ == null) { return beforeColumns_.size(); @@ -3881,6 +6510,13 @@ public final class CanalEntry { return beforeColumnsBuilder_.getCount(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { if (beforeColumnsBuilder_ == null) { return beforeColumns_.get(index); @@ -3888,6 +6524,13 @@ public final class CanalEntry { return beforeColumnsBuilder_.getMessage(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public Builder setBeforeColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (beforeColumnsBuilder_ == null) { @@ -3902,6 +6545,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public Builder setBeforeColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (beforeColumnsBuilder_ == null) { @@ -3913,6 +6563,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public Builder addBeforeColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (beforeColumnsBuilder_ == null) { if (value == null) { @@ -3926,6 +6583,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public Builder addBeforeColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (beforeColumnsBuilder_ == null) { @@ -3940,6 +6604,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public Builder addBeforeColumns( com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (beforeColumnsBuilder_ == null) { @@ -3951,6 +6622,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public Builder addBeforeColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (beforeColumnsBuilder_ == null) { @@ -3962,17 +6640,32 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public Builder addAllBeforeColumns( java.lang.Iterable values) { if (beforeColumnsBuilder_ == null) { ensureBeforeColumnsIsMutable(); - super.addAll(values, beforeColumns_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, beforeColumns_); onChanged(); } else { beforeColumnsBuilder_.addAllMessages(values); } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public Builder clearBeforeColumns() { if (beforeColumnsBuilder_ == null) { beforeColumns_ = java.util.Collections.emptyList(); @@ -3983,6 +6676,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public Builder removeBeforeColumns(int index) { if (beforeColumnsBuilder_ == null) { ensureBeforeColumnsIsMutable(); @@ -3993,10 +6693,24 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ 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; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( int index) { if (beforeColumnsBuilder_ == null) { @@ -4004,6 +6718,13 @@ public final class CanalEntry { return beforeColumnsBuilder_.getMessageOrBuilder(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public java.util.List getBeforeColumnsOrBuilderList() { if (beforeColumnsBuilder_ != null) { @@ -4012,15 +6733,36 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(beforeColumns_); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder() { return getBeforeColumnsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder( int index) { return getBeforeColumnsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ public java.util.List getBeforeColumnsBuilderList() { return getBeforeColumnsFieldBuilder().getBuilderList(); @@ -4039,8 +6781,7 @@ public final class CanalEntry { } return beforeColumnsBuilder_; } - - // repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + private java.util.List afterColumns_ = java.util.Collections.emptyList(); private void ensureAfterColumnsIsMutable() { @@ -4049,10 +6790,17 @@ public final class CanalEntry { bitField0_ |= 0x00000002; } } - + private com.google.protobuf.RepeatedFieldBuilder< 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; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public java.util.List getAfterColumnsList() { if (afterColumnsBuilder_ == null) { return java.util.Collections.unmodifiableList(afterColumns_); @@ -4060,6 +6808,13 @@ public final class CanalEntry { return afterColumnsBuilder_.getMessageList(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public int getAfterColumnsCount() { if (afterColumnsBuilder_ == null) { return afterColumns_.size(); @@ -4067,6 +6822,13 @@ public final class CanalEntry { return afterColumnsBuilder_.getCount(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { if (afterColumnsBuilder_ == null) { return afterColumns_.get(index); @@ -4074,6 +6836,13 @@ public final class CanalEntry { return afterColumnsBuilder_.getMessage(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public Builder setAfterColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (afterColumnsBuilder_ == null) { @@ -4088,6 +6857,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public Builder setAfterColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (afterColumnsBuilder_ == null) { @@ -4099,6 +6875,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public Builder addAfterColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (afterColumnsBuilder_ == null) { if (value == null) { @@ -4112,6 +6895,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public Builder addAfterColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (afterColumnsBuilder_ == null) { @@ -4126,6 +6916,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public Builder addAfterColumns( com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (afterColumnsBuilder_ == null) { @@ -4137,6 +6934,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public Builder addAfterColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (afterColumnsBuilder_ == null) { @@ -4148,17 +6952,32 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public Builder addAllAfterColumns( java.lang.Iterable values) { if (afterColumnsBuilder_ == null) { ensureAfterColumnsIsMutable(); - super.addAll(values, afterColumns_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, afterColumns_); onChanged(); } else { afterColumnsBuilder_.addAllMessages(values); } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public Builder clearAfterColumns() { if (afterColumnsBuilder_ == null) { afterColumns_ = java.util.Collections.emptyList(); @@ -4169,6 +6988,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public Builder removeAfterColumns(int index) { if (afterColumnsBuilder_ == null) { ensureAfterColumnsIsMutable(); @@ -4179,10 +7005,24 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ 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; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( int index) { if (afterColumnsBuilder_ == null) { @@ -4190,6 +7030,13 @@ public final class CanalEntry { return afterColumnsBuilder_.getMessageOrBuilder(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public java.util.List getAfterColumnsOrBuilderList() { if (afterColumnsBuilder_ != null) { @@ -4198,15 +7045,36 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(afterColumns_); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder() { return getAfterColumnsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder( int index) { return getAfterColumnsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ public java.util.List getAfterColumnsBuilderList() { return getAfterColumnsFieldBuilder().getBuilderList(); @@ -4225,8 +7093,7 @@ public final class CanalEntry { } return afterColumnsBuilder_; } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { @@ -4235,10 +7102,17 @@ public final class CanalEntry { bitField0_ |= 0x00000004; } } - + private com.google.protobuf.RepeatedFieldBuilder< 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; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -4246,6 +7120,13 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -4253,6 +7134,13 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -4260,6 +7148,13 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -4274,6 +7169,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -4285,6 +7187,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -4298,6 +7207,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -4312,6 +7228,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -4323,6 +7246,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -4334,17 +7264,32 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); - super.addAll(values, props_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); onChanged(); } else { propsBuilder_.addAllMessages(values); } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -4355,6 +7300,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -4365,10 +7317,24 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ 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; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -4376,6 +7342,13 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -4384,15 +7357,36 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -4411,226 +7405,651 @@ public final class CanalEntry { } return propsBuilder_; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.RowData) } - + static { defaultInstance = new RowData(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowData) } - - public interface RowChangeOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int64 tableId = 1; + + public interface RowChangeOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.RowChange) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 tableId = 1; + * + *
+     **tableId,由数据库产生*
+     * 
+ */ boolean hasTableId(); + /** + * optional int64 tableId = 1; + * + *
+     **tableId,由数据库产生*
+     * 
+ */ long getTableId(); - - // optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ boolean hasEventType(); + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType(); - - // optional bool isDdl = 10 [default = false]; + + /** + * optional bool isDdl = 10 [default = false]; + * + *
+     ** 标识是否是ddl语句  *
+     * 
+ */ boolean hasIsDdl(); + /** + * optional bool isDdl = 10 [default = false]; + * + *
+     ** 标识是否是ddl语句  *
+     * 
+ */ boolean getIsDdl(); - - // optional string sql = 11; + + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ boolean hasSql(); - String getSql(); - - // repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + java.lang.String getSql(); + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + com.google.protobuf.ByteString + getSqlBytes(); + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ java.util.List getRowDatasList(); + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ int getRowDatasCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ java.util.List getRowDatasOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ 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 getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ java.util.List getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); - - // optional string ddlSchemaName = 14; + + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ boolean hasDdlSchemaName(); - String getDdlSchemaName(); + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + java.lang.String getDdlSchemaName(); + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + com.google.protobuf.ByteString + getDdlSchemaNameBytes(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} + * + *
+   **message row 每行变更数据的数据结构*
+   * 
+ */ public static final class RowChange extends - com.google.protobuf.GeneratedMessage - implements RowChangeOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowChange) + RowChangeOrBuilder { // Use RowChange.newBuilder() to construct. - private RowChange(Builder builder) { + private RowChange(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private RowChange(boolean noInit) {} - + 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; + @java.lang.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(); + com.alibaba.otter.canal.protocol.CanalEntry.EventType value = com.alibaba.otter.canal.protocol.CanalEntry.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(com.alibaba.otter.canal.protocol.CanalEntry.RowData.PARSER, extensionRegistry)); + break; + } + case 106: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + props_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.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(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional int64 tableId = 1; public static final int TABLEID_FIELD_NUMBER = 1; private long tableId_; + /** + * optional int64 tableId = 1; + * + *
+     **tableId,由数据库产生*
+     * 
+ */ public boolean hasTableId() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 tableId = 1; + * + *
+     **tableId,由数据库产生*
+     * 
+ */ public long getTableId() { return tableId_; } - - // optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + public static final int EVENTTYPE_FIELD_NUMBER = 2; private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_; + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ public boolean hasEventType() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { return eventType_; } - - // optional bool isDdl = 10 [default = false]; + public static final int ISDDL_FIELD_NUMBER = 10; private boolean isDdl_; + /** + * optional bool isDdl = 10 [default = false]; + * + *
+     ** 标识是否是ddl语句  *
+     * 
+ */ public boolean hasIsDdl() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional bool isDdl = 10 [default = false]; + * + *
+     ** 标识是否是ddl语句  *
+     * 
+ */ public boolean getIsDdl() { return isDdl_; } - - // optional string sql = 11; + public static final int SQL_FIELD_NUMBER = 11; private java.lang.Object sql_; + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ public boolean hasSql() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public String getSql() { + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + public java.lang.String getSql() { java.lang.Object ref = sql_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { sql_ = s; } return s; } } - private com.google.protobuf.ByteString getSqlBytes() { + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + public com.google.protobuf.ByteString + getSqlBytes() { java.lang.Object ref = sql_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); sql_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + public static final int ROWDATAS_FIELD_NUMBER = 12; private java.util.List rowDatas_; + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ public java.util.List getRowDatasList() { return rowDatas_; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ public java.util.List getRowDatasOrBuilderList() { return rowDatas_; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ public int getRowDatasCount() { return rowDatas_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { return rowDatas_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( int index) { return rowDatas_.get(index); } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + public static final int PROPS_FIELD_NUMBER = 13; private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ public int getPropsCount() { return props_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } - - // optional string ddlSchemaName = 14; + public static final int DDLSCHEMANAME_FIELD_NUMBER = 14; private java.lang.Object ddlSchemaName_; + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ public boolean hasDdlSchemaName() { return ((bitField0_ & 0x00000010) == 0x00000010); } - public String getDdlSchemaName() { + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + public java.lang.String getDdlSchemaName() { java.lang.Object ref = ddlSchemaName_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { ddlSchemaName_ = s; } return s; } } - private com.google.protobuf.ByteString getDdlSchemaNameBytes() { + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + public com.google.protobuf.ByteString + getDdlSchemaNameBytes() { java.lang.Object ref = ddlSchemaName_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); ddlSchemaName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + private void initFields() { tableId_ = 0L; eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; @@ -4643,12 +8062,13 @@ public final class CanalEntry { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -4675,12 +8095,12 @@ public final class CanalEntry { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -4714,113 +8134,110 @@ public final class CanalEntry { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } 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 newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } 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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.RowChange prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} + * + *
+     **message row 每行变更数据的数据结构*
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalEntry.RowChangeOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.RowChange) + com.alibaba.otter.canal.protocol.CanalEntry.RowChangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -4833,7 +8250,7 @@ public final class CanalEntry { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); tableId_ = 0L; @@ -4860,20 +8277,20 @@ public final class CanalEntry { bitField0_ = (bitField0_ & ~0x00000040); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.RowChange.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalEntry.RowChange getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalEntry.RowChange.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalEntry.RowChange build() { com.alibaba.otter.canal.protocol.CanalEntry.RowChange result = buildPartial(); if (!result.isInitialized()) { @@ -4881,17 +8298,7 @@ public final class CanalEntry { } return result; } - - private com.alibaba.otter.canal.protocol.CanalEntry.RowChange buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalEntry.RowChange result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -4938,7 +8345,7 @@ public final class CanalEntry { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowChange) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.RowChange)other); @@ -4947,7 +8354,7 @@ public final class CanalEntry { return this; } } - + 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.hasTableId()) { @@ -4960,7 +8367,9 @@ public final class CanalEntry { setIsDdl(other.getIsDdl()); } if (other.hasSql()) { - setSql(other.getSql()); + bitField0_ |= 0x00000008; + sql_ = other.sql_; + onChanged(); } if (rowDatasBuilder_ == null) { if (!other.rowDatas_.isEmpty()) { @@ -5015,117 +8424,113 @@ public final class CanalEntry { } } if (other.hasDdlSchemaName()) { - setDdlSchemaName(other.getDdlSchemaName()); + bitField0_ |= 0x00000040; + ddlSchemaName_ = other.ddlSchemaName_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - tableId_ = input.readInt64(); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalEntry.EventType value = com.alibaba.otter.canal.protocol.CanalEntry.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: { - bitField0_ |= 0x00000008; - sql_ = input.readBytes(); - break; - } - case 98: { - com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.RowData.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addRowDatas(subBuilder.buildPartial()); - break; - } - case 106: { - com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.Pair.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addProps(subBuilder.buildPartial()); - break; - } - case 114: { - bitField0_ |= 0x00000040; - ddlSchemaName_ = input.readBytes(); - break; - } + com.alibaba.otter.canal.protocol.CanalEntry.RowChange parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.RowChange) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional int64 tableId = 1; + private long tableId_ ; + /** + * optional int64 tableId = 1; + * + *
+       **tableId,由数据库产生*
+       * 
+ */ public boolean hasTableId() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 tableId = 1; + * + *
+       **tableId,由数据库产生*
+       * 
+ */ public long getTableId() { return tableId_; } + /** + * optional int64 tableId = 1; + * + *
+       **tableId,由数据库产生*
+       * 
+ */ public Builder setTableId(long value) { bitField0_ |= 0x00000001; tableId_ = value; onChanged(); return this; } + /** + * optional int64 tableId = 1; + * + *
+       **tableId,由数据库产生*
+       * 
+ */ public Builder clearTableId() { bitField0_ = (bitField0_ & ~0x00000001); tableId_ = 0L; onChanged(); return this; } - - // optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ public boolean hasEventType() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { return eventType_; } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { if (value == null) { throw new NullPointerException(); @@ -5135,50 +8540,129 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ public Builder clearEventType() { bitField0_ = (bitField0_ & ~0x00000002); eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; onChanged(); return this; } - - // optional bool isDdl = 10 [default = false]; + private boolean isDdl_ ; + /** + * optional bool isDdl = 10 [default = false]; + * + *
+       ** 标识是否是ddl语句  *
+       * 
+ */ public boolean hasIsDdl() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional bool isDdl = 10 [default = false]; + * + *
+       ** 标识是否是ddl语句  *
+       * 
+ */ public boolean getIsDdl() { return isDdl_; } + /** + * optional bool isDdl = 10 [default = false]; + * + *
+       ** 标识是否是ddl语句  *
+       * 
+ */ public Builder setIsDdl(boolean value) { bitField0_ |= 0x00000004; isDdl_ = value; onChanged(); return this; } + /** + * optional bool isDdl = 10 [default = false]; + * + *
+       ** 标识是否是ddl语句  *
+       * 
+ */ public Builder clearIsDdl() { bitField0_ = (bitField0_ & ~0x00000004); isDdl_ = false; onChanged(); return this; } - - // optional string sql = 11; + private java.lang.Object sql_ = ""; + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ public boolean hasSql() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public String getSql() { + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public java.lang.String getSql() { java.lang.Object ref = sql_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - sql_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + sql_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setSql(String value) { + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public com.google.protobuf.ByteString + getSqlBytes() { + java.lang.Object ref = sql_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sql_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public Builder setSql( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -5187,19 +8671,37 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ public Builder clearSql() { bitField0_ = (bitField0_ & ~0x00000008); sql_ = getDefaultInstance().getSql(); onChanged(); return this; } - void setSql(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000008; + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public Builder setSqlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; sql_ = value; onChanged(); + return this; } - - // repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + private java.util.List rowDatas_ = java.util.Collections.emptyList(); private void ensureRowDatasIsMutable() { @@ -5208,10 +8710,17 @@ public final class CanalEntry { bitField0_ |= 0x00000010; } } - + private com.google.protobuf.RepeatedFieldBuilder< 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; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public java.util.List getRowDatasList() { if (rowDatasBuilder_ == null) { return java.util.Collections.unmodifiableList(rowDatas_); @@ -5219,6 +8728,13 @@ public final class CanalEntry { return rowDatasBuilder_.getMessageList(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public int getRowDatasCount() { if (rowDatasBuilder_ == null) { return rowDatas_.size(); @@ -5226,6 +8742,13 @@ public final class CanalEntry { return rowDatasBuilder_.getCount(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { if (rowDatasBuilder_ == null) { return rowDatas_.get(index); @@ -5233,6 +8756,13 @@ public final class CanalEntry { return rowDatasBuilder_.getMessage(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public Builder setRowDatas( int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { if (rowDatasBuilder_ == null) { @@ -5247,6 +8777,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public Builder setRowDatas( int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { if (rowDatasBuilder_ == null) { @@ -5258,6 +8795,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public Builder addRowDatas(com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { if (rowDatasBuilder_ == null) { if (value == null) { @@ -5271,6 +8815,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public Builder addRowDatas( int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { if (rowDatasBuilder_ == null) { @@ -5285,6 +8836,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public Builder addRowDatas( com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { if (rowDatasBuilder_ == null) { @@ -5296,6 +8854,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public Builder addRowDatas( int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { if (rowDatasBuilder_ == null) { @@ -5307,17 +8872,32 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public Builder addAllRowDatas( java.lang.Iterable values) { if (rowDatasBuilder_ == null) { ensureRowDatasIsMutable(); - super.addAll(values, rowDatas_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rowDatas_); onChanged(); } else { rowDatasBuilder_.addAllMessages(values); } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public Builder clearRowDatas() { if (rowDatasBuilder_ == null) { rowDatas_ = java.util.Collections.emptyList(); @@ -5328,6 +8908,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public Builder removeRowDatas(int index) { if (rowDatasBuilder_ == null) { ensureRowDatasIsMutable(); @@ -5338,10 +8925,24 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ 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; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( int index) { if (rowDatasBuilder_ == null) { @@ -5349,6 +8950,13 @@ public final class CanalEntry { return rowDatasBuilder_.getMessageOrBuilder(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public java.util.List getRowDatasOrBuilderList() { if (rowDatasBuilder_ != null) { @@ -5357,15 +8965,36 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(rowDatas_); } } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder() { return getRowDatasFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder( int index) { return getRowDatasFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ public java.util.List getRowDatasBuilderList() { return getRowDatasFieldBuilder().getBuilderList(); @@ -5384,8 +9013,7 @@ public final class CanalEntry { } return rowDatasBuilder_; } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { @@ -5394,10 +9022,17 @@ public final class CanalEntry { bitField0_ |= 0x00000020; } } - + private com.google.protobuf.RepeatedFieldBuilder< 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; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -5405,6 +9040,13 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -5412,6 +9054,13 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -5419,6 +9068,13 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -5433,6 +9089,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -5444,6 +9107,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -5457,6 +9127,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -5471,6 +9148,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -5482,6 +9166,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -5493,17 +9184,32 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); - super.addAll(values, props_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); onChanged(); } else { propsBuilder_.addAllMessages(values); } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -5514,6 +9220,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -5524,10 +9237,24 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ 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; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -5535,6 +9262,13 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -5543,15 +9277,36 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -5570,23 +9325,68 @@ public final class CanalEntry { } return propsBuilder_; } - - // optional string ddlSchemaName = 14; + private java.lang.Object ddlSchemaName_ = ""; + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ public boolean hasDdlSchemaName() { return ((bitField0_ & 0x00000040) == 0x00000040); } - public String getDdlSchemaName() { + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public java.lang.String getDdlSchemaName() { java.lang.Object ref = ddlSchemaName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - ddlSchemaName_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ddlSchemaName_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setDdlSchemaName(String value) { + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public com.google.protobuf.ByteString + getDdlSchemaNameBytes() { + java.lang.Object ref = ddlSchemaName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ddlSchemaName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public Builder setDdlSchemaName( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -5595,156 +9395,434 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ public Builder clearDdlSchemaName() { bitField0_ = (bitField0_ & ~0x00000040); ddlSchemaName_ = getDefaultInstance().getDdlSchemaName(); onChanged(); return this; } - void setDdlSchemaName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000040; + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public Builder setDdlSchemaNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; ddlSchemaName_ = value; onChanged(); + return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.RowChange) } - + static { defaultInstance = new RowChange(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowChange) } - - public interface TransactionBeginOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int64 executeTime = 1; + + public interface TransactionBeginOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.TransactionBegin) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ boolean hasExecuteTime(); + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ long getExecuteTime(); - - // optional string transactionId = 2; + + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ boolean hasTransactionId(); - String getTransactionId(); - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + java.lang.String getTransactionId(); + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + com.google.protobuf.ByteString + getTransactionIdBytes(); + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ java.util.List getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ java.util.List getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); - - // optional int64 threadId = 4; + + /** + * optional int64 threadId = 4; + * + *
+     **执行的thread Id*
+     * 
+ */ boolean hasThreadId(); + /** + * optional int64 threadId = 4; + * + *
+     **执行的thread Id*
+     * 
+ */ long getThreadId(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} + * + *
+   **开始事务的一些信息*
+   * 
+ */ public static final class TransactionBegin extends - com.google.protobuf.GeneratedMessage - implements TransactionBeginOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionBegin) + TransactionBeginOrBuilder { // Use TransactionBegin.newBuilder() to construct. - private TransactionBegin(Builder builder) { + private TransactionBegin(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private TransactionBegin(boolean noInit) {} - + 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 final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.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(com.alibaba.otter.canal.protocol.CanalEntry.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 com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.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); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional int64 executeTime = 1; public static final int EXECUTETIME_FIELD_NUMBER = 1; private long executeTime_; + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ public long getExecuteTime() { return executeTime_; } - - // optional string transactionId = 2; + public static final int TRANSACTIONID_FIELD_NUMBER = 2; private java.lang.Object transactionId_; + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ public boolean hasTransactionId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getTransactionId() { + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { transactionId_ = s; } return s; } } - private com.google.protobuf.ByteString getTransactionIdBytes() { + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { java.lang.Object ref = transactionId_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); transactionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + public static final int PROPS_FIELD_NUMBER = 3; private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public int getPropsCount() { return props_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } - - // optional int64 threadId = 4; + public static final int THREADID_FIELD_NUMBER = 4; private long threadId_; + /** + * optional int64 threadId = 4; + * + *
+     **执行的thread Id*
+     * 
+ */ public boolean hasThreadId() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int64 threadId = 4; + * + *
+     **执行的thread Id*
+     * 
+ */ public long getThreadId() { return threadId_; } - + private void initFields() { executeTime_ = 0L; transactionId_ = ""; @@ -5754,12 +9832,13 @@ public final class CanalEntry { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5777,12 +9856,12 @@ public final class CanalEntry { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5804,113 +9883,110 @@ public final class CanalEntry { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } 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 newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } 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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} + * + *
+     **开始事务的一些信息*
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalEntry.TransactionBeginOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.TransactionBegin) + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBeginOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5922,7 +9998,7 @@ public final class CanalEntry { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); executeTime_ = 0L; @@ -5939,20 +10015,20 @@ public final class CanalEntry { bitField0_ = (bitField0_ & ~0x00000008); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin build() { com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result = buildPartial(); if (!result.isInitialized()) { @@ -5960,17 +10036,7 @@ public final class CanalEntry { } return result; } - - private com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -6000,7 +10066,7 @@ public final class CanalEntry { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin)other); @@ -6009,14 +10075,16 @@ public final class CanalEntry { return this; } } - + 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.hasExecuteTime()) { setExecuteTime(other.getExecuteTime()); } if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + bitField0_ |= 0x00000002; + transactionId_ = other.transactionId_; + onChanged(); } if (propsBuilder_ == null) { if (!other.props_.isEmpty()) { @@ -6050,98 +10118,139 @@ public final class CanalEntry { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - executeTime_ = input.readInt64(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - transactionId_ = input.readBytes(); - break; - } - case 26: { - com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.Pair.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addProps(subBuilder.buildPartial()); - break; - } - case 32: { - bitField0_ |= 0x00000008; - threadId_ = input.readInt64(); - break; - } + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional int64 executeTime = 1; + private long executeTime_ ; + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ public long getExecuteTime() { return executeTime_; } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ public Builder setExecuteTime(long value) { bitField0_ |= 0x00000001; executeTime_ = value; onChanged(); return this; } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ public Builder clearExecuteTime() { bitField0_ = (bitField0_ & ~0x00000001); executeTime_ = 0L; onChanged(); return this; } - - // optional string transactionId = 2; + private java.lang.Object transactionId_ = ""; + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ public boolean hasTransactionId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getTransactionId() { + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + transactionId_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setTransactionId(String value) { + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public Builder setTransactionId( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -6150,19 +10259,37 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ public Builder clearTransactionId() { bitField0_ = (bitField0_ & ~0x00000002); transactionId_ = getDefaultInstance().getTransactionId(); onChanged(); return this; } - void setTransactionId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public Builder setTransactionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; transactionId_ = value; onChanged(); + return this; } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { @@ -6171,10 +10298,17 @@ public final class CanalEntry { bitField0_ |= 0x00000004; } } - + private com.google.protobuf.RepeatedFieldBuilder< 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; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -6182,6 +10316,13 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -6189,6 +10330,13 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -6196,6 +10344,13 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -6210,6 +10365,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -6221,6 +10383,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -6234,6 +10403,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -6248,6 +10424,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -6259,6 +10442,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -6270,17 +10460,32 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); - super.addAll(values, props_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); onChanged(); } else { propsBuilder_.addAllMessages(values); } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -6291,6 +10496,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -6301,10 +10513,24 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ 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; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -6312,6 +10538,13 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -6320,15 +10553,36 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -6347,152 +10601,407 @@ public final class CanalEntry { } return propsBuilder_; } - - // optional int64 threadId = 4; + private long threadId_ ; + /** + * optional int64 threadId = 4; + * + *
+       **执行的thread Id*
+       * 
+ */ public boolean hasThreadId() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional int64 threadId = 4; + * + *
+       **执行的thread Id*
+       * 
+ */ public long getThreadId() { return threadId_; } + /** + * optional int64 threadId = 4; + * + *
+       **执行的thread Id*
+       * 
+ */ public Builder setThreadId(long value) { bitField0_ |= 0x00000008; threadId_ = value; onChanged(); return this; } + /** + * optional int64 threadId = 4; + * + *
+       **执行的thread Id*
+       * 
+ */ public Builder clearThreadId() { bitField0_ = (bitField0_ & ~0x00000008); threadId_ = 0L; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.TransactionBegin) } - + static { defaultInstance = new TransactionBegin(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionBegin) } - - public interface TransactionEndOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int64 executeTime = 1; + + public interface TransactionEndOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.TransactionEnd) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ boolean hasExecuteTime(); + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ long getExecuteTime(); - - // optional string transactionId = 2; + + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ boolean hasTransactionId(); - String getTransactionId(); - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + java.lang.String getTransactionId(); + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + com.google.protobuf.ByteString + getTransactionIdBytes(); + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ java.util.List getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ java.util.List getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} + * + *
+   **结束事务的一些信息*
+   * 
+ */ public static final class TransactionEnd extends - com.google.protobuf.GeneratedMessage - implements TransactionEndOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionEnd) + TransactionEndOrBuilder { // Use TransactionEnd.newBuilder() to construct. - private TransactionEnd(Builder builder) { + private TransactionEnd(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private TransactionEnd(boolean noInit) {} - + 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 final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.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(com.alibaba.otter.canal.protocol.CanalEntry.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 com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.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); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional int64 executeTime = 1; public static final int EXECUTETIME_FIELD_NUMBER = 1; private long executeTime_; + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ public long getExecuteTime() { return executeTime_; } - - // optional string transactionId = 2; + public static final int TRANSACTIONID_FIELD_NUMBER = 2; private java.lang.Object transactionId_; + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ public boolean hasTransactionId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getTransactionId() { + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { transactionId_ = s; } return s; } } - private com.google.protobuf.ByteString getTransactionIdBytes() { + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { java.lang.Object ref = transactionId_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); transactionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + public static final int PROPS_FIELD_NUMBER = 3; private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public int getPropsCount() { return props_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); } - + private void initFields() { executeTime_ = 0L; transactionId_ = ""; @@ -6501,12 +11010,13 @@ public final class CanalEntry { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -6521,12 +11031,12 @@ public final class CanalEntry { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -6544,113 +11054,110 @@ public final class CanalEntry { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } 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 newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } 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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} + * + *
+     **结束事务的一些信息*
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalEntry.TransactionEndOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.TransactionEnd) + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEndOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6662,7 +11169,7 @@ public final class CanalEntry { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); executeTime_ = 0L; @@ -6677,20 +11184,20 @@ public final class CanalEntry { } return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd build() { com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result = buildPartial(); if (!result.isInitialized()) { @@ -6698,17 +11205,7 @@ public final class CanalEntry { } return result; } - - private com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -6734,7 +11231,7 @@ public final class CanalEntry { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd)other); @@ -6743,14 +11240,16 @@ public final class CanalEntry { return this; } } - + 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.hasExecuteTime()) { setExecuteTime(other.getExecuteTime()); } if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + bitField0_ |= 0x00000002; + transactionId_ = other.transactionId_; + onChanged(); } if (propsBuilder_ == null) { if (!other.props_.isEmpty()) { @@ -6781,93 +11280,139 @@ public final class CanalEntry { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - executeTime_ = input.readInt64(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - transactionId_ = input.readBytes(); - break; - } - case 26: { - com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder subBuilder = com.alibaba.otter.canal.protocol.CanalEntry.Pair.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addProps(subBuilder.buildPartial()); - break; - } + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional int64 executeTime = 1; + private long executeTime_ ; + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ public long getExecuteTime() { return executeTime_; } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ public Builder setExecuteTime(long value) { bitField0_ |= 0x00000001; executeTime_ = value; onChanged(); return this; } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ public Builder clearExecuteTime() { bitField0_ = (bitField0_ & ~0x00000001); executeTime_ = 0L; onChanged(); return this; } - - // optional string transactionId = 2; + private java.lang.Object transactionId_ = ""; + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ public boolean hasTransactionId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getTransactionId() { + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + transactionId_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setTransactionId(String value) { + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public Builder setTransactionId( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -6876,19 +11421,37 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ public Builder clearTransactionId() { bitField0_ = (bitField0_ & ~0x00000002); transactionId_ = getDefaultInstance().getTransactionId(); onChanged(); return this; } - void setTransactionId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public Builder setTransactionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; transactionId_ = value; onChanged(); + return this; } - - // repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + private java.util.List props_ = java.util.Collections.emptyList(); private void ensurePropsIsMutable() { @@ -6897,10 +11460,17 @@ public final class CanalEntry { bitField0_ |= 0x00000004; } } - + private com.google.protobuf.RepeatedFieldBuilder< 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; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -6908,6 +11478,13 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -6915,6 +11492,13 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -6922,6 +11506,13 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -6936,6 +11527,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -6947,6 +11545,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -6960,6 +11565,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -6974,6 +11586,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -6985,6 +11604,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -6996,17 +11622,32 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { ensurePropsIsMutable(); - super.addAll(values, props_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); onChanged(); } else { propsBuilder_.addAllMessages(values); } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -7017,6 +11658,13 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -7027,10 +11675,24 @@ public final class CanalEntry { } return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ 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; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -7038,6 +11700,13 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -7046,15 +11715,36 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -7073,122 +11763,242 @@ public final class CanalEntry { } return propsBuilder_; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.TransactionEnd) } - + static { defaultInstance = new TransactionEnd(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionEnd) } - - public interface PairOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string key = 1; + + public interface PairOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Pair) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string key = 1; + */ boolean hasKey(); - String getKey(); - - // optional string value = 2; + /** + * optional string key = 1; + */ + java.lang.String getKey(); + /** + * optional string key = 1; + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * optional string value = 2; + */ boolean hasValue(); - String getValue(); + /** + * optional string value = 2; + */ + java.lang.String getValue(); + /** + * optional string value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} + * + *
+   **预留扩展*
+   * 
+ */ public static final class Pair extends - com.google.protobuf.GeneratedMessage - implements PairOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Pair) + PairOrBuilder { // Use Pair.newBuilder() to construct. - private Pair(Builder builder) { + private Pair(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Pair(boolean noInit) {} - + 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 final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.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 com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.class, com.alibaba.otter.canal.protocol.CanalEntry.Pair.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); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional string key = 1; public static final int KEY_FIELD_NUMBER = 1; private java.lang.Object key_; + /** + * optional string key = 1; + */ public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getKey() { + /** + * optional string key = 1; + */ + public java.lang.String getKey() { java.lang.Object ref = key_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { key_ = s; } return s; } } - private com.google.protobuf.ByteString getKeyBytes() { + /** + * optional string key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { java.lang.Object ref = key_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string value = 2; + public static final int VALUE_FIELD_NUMBER = 2; private java.lang.Object value_; + /** + * optional string value = 2; + */ public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getValue() { + /** + * optional string value = 2; + */ + public java.lang.String getValue() { java.lang.Object ref = value_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { value_ = s; } return s; } } - private com.google.protobuf.ByteString getValueBytes() { + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { java.lang.Object ref = value_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + private void initFields() { key_ = ""; value_ = ""; @@ -7196,12 +12006,13 @@ public final class CanalEntry { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -7213,12 +12024,12 @@ public final class CanalEntry { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -7232,113 +12043,110 @@ public final class CanalEntry { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } 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 newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(input); } 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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} + * + *
+     **预留扩展*
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Pair) + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.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( + 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) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -7349,7 +12157,7 @@ public final class CanalEntry { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); key_ = ""; @@ -7358,20 +12166,20 @@ public final class CanalEntry { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalEntry.Pair build() { com.alibaba.otter.canal.protocol.CanalEntry.Pair result = buildPartial(); if (!result.isInitialized()) { @@ -7379,17 +12187,7 @@ public final class CanalEntry { } return result; } - - private com.alibaba.otter.canal.protocol.CanalEntry.Pair buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalEntry.Pair result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -7406,7 +12204,7 @@ public final class CanalEntry { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Pair) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Pair)other); @@ -7415,78 +12213,91 @@ public final class CanalEntry { return this; } } - + 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.hasKey()) { - setKey(other.getKey()); + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); } if (other.hasValue()) { - setValue(other.getValue()); + bitField0_ |= 0x00000002; + value_ = other.value_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - key_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - value_ = input.readBytes(); - break; - } + com.alibaba.otter.canal.protocol.CanalEntry.Pair parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Pair) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional string key = 1; + private java.lang.Object key_ = ""; + /** + * optional string key = 1; + */ public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getKey() { + /** + * optional string key = 1; + */ + public java.lang.String getKey() { java.lang.Object ref = key_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - key_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setKey(String value) { + /** + * optional string key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string key = 1; + */ + public Builder setKey( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -7495,34 +12306,74 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string key = 1; + */ public Builder clearKey() { bitField0_ = (bitField0_ & ~0x00000001); key_ = getDefaultInstance().getKey(); onChanged(); return this; } - void setKey(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string key = 1; + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; key_ = value; onChanged(); + return this; } - - // optional string value = 2; + private java.lang.Object value_ = ""; + /** + * optional string value = 2; + */ public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getValue() { + /** + * optional string value = 2; + */ + public java.lang.String getValue() { java.lang.Object ref = value_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - value_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setValue(String value) { + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string value = 2; + */ + public Builder setValue( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -7531,70 +12382,81 @@ public final class CanalEntry { onChanged(); return this; } + /** + * optional string value = 2; + */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000002); value_ = getDefaultInstance().getValue(); onChanged(); return this; } - void setValue(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string value = 2; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; value_ = value; onChanged(); + return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Pair) } - + static { defaultInstance = new Pair(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Pair) } - - private static com.google.protobuf.Descriptors.Descriptor + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable; - + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -7653,82 +12515,66 @@ public final class CanalEntry { "anal.protocolB\nCanalEntryH\001" }; 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; - 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 java.lang.String[] { "Header", "EntryType", "StoreValue", }, - com.alibaba.otter.canal.protocol.CanalEntry.Entry.class, - com.alibaba.otter.canal.protocol.CanalEntry.Entry.Builder.class); - 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 java.lang.String[] { "Version", "LogfileName", "LogfileOffset", "ServerId", "ServerenCode", "ExecuteTime", "SourceType", "SchemaName", "TableName", "EventLength", "EventType", "Props", }, - com.alibaba.otter.canal.protocol.CanalEntry.Header.class, - com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder.class); - 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 java.lang.String[] { "Index", "SqlType", "Name", "IsKey", "Updated", "IsNull", "Props", "Value", "Length", "MysqlType", }, - com.alibaba.otter.canal.protocol.CanalEntry.Column.class, - com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder.class); - 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 java.lang.String[] { "BeforeColumns", "AfterColumns", "Props", }, - com.alibaba.otter.canal.protocol.CanalEntry.RowData.class, - com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder.class); - 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 java.lang.String[] { "TableId", "EventType", "IsDdl", "Sql", "RowDatas", "Props", "DdlSchemaName", }, - com.alibaba.otter.canal.protocol.CanalEntry.RowChange.class, - com.alibaba.otter.canal.protocol.CanalEntry.RowChange.Builder.class); - 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 java.lang.String[] { "ExecuteTime", "TransactionId", "Props", "ThreadId", }, - com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.class, - com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.Builder.class); - 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 java.lang.String[] { "ExecuteTime", "TransactionId", "Props", }, - com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.class, - com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.Builder.class); - 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 java.lang.String[] { "Key", "Value", }, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.class, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder.class); - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); + internal_static_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 java.lang.String[] { "Header", "EntryType", "StoreValue", }); + 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 java.lang.String[] { "Version", "LogfileName", "LogfileOffset", "ServerId", "ServerenCode", "ExecuteTime", "SourceType", "SchemaName", "TableName", "EventLength", "EventType", "Props", }); + 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 java.lang.String[] { "Index", "SqlType", "Name", "IsKey", "Updated", "IsNull", "Props", "Value", "Length", "MysqlType", }); + 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 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 java.lang.String[] { "TableId", "EventType", "IsDdl", "Sql", "RowDatas", "Props", "DdlSchemaName", }); + 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 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 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 java.lang.String[] { "Key", "Value", }); } - + // @@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 old mode 100755 new mode 100644 index 890a0930..23c21ae8 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalPacket.java +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalPacket.java @@ -8,22 +8,49 @@ public final class CanalPacket { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.Compression} + */ public enum Compression implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 1; + */ NONE(0, 1), + /** + * ZLIB = 2; + */ ZLIB(1, 2), + /** + * GZIP = 3; + */ GZIP(2, 3), + /** + * LZF = 4; + */ LZF(3, 4), ; - + + /** + * NONE = 1; + */ public static final int NONE_VALUE = 1; + /** + * ZLIB = 2; + */ public static final int ZLIB_VALUE = 2; + /** + * GZIP = 3; + */ public static final int GZIP_VALUE = 3; + /** + * LZF = 4; + */ public static final int LZF_VALUE = 4; - - + + public final int getNumber() { return value; } - + public static Compression valueOf(int value) { switch (value) { case 1: return NONE; @@ -33,7 +60,7 @@ public final class CanalPacket { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -45,7 +72,7 @@ public final class CanalPacket { return Compression.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -58,11 +85,9 @@ public final class CanalPacket { getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.getDescriptor().getEnumTypes().get(0); } - - private static final Compression[] VALUES = { - NONE, ZLIB, GZIP, LZF, - }; - + + private static final Compression[] VALUES = values(); + public static Compression valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -71,50 +96,141 @@ public final class CanalPacket { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private Compression(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.Compression) } - + + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.PacketType} + */ public enum PacketType implements com.google.protobuf.ProtocolMessageEnum { + /** + * HANDSHAKE = 1; + */ HANDSHAKE(0, 1), + /** + * CLIENTAUTHENTICATION = 2; + */ CLIENTAUTHENTICATION(1, 2), + /** + * ACK = 3; + */ ACK(2, 3), + /** + * SUBSCRIPTION = 4; + */ SUBSCRIPTION(3, 4), + /** + * UNSUBSCRIPTION = 5; + */ UNSUBSCRIPTION(4, 5), + /** + * GET = 6; + */ GET(5, 6), + /** + * MESSAGES = 7; + */ MESSAGES(6, 7), + /** + * CLIENTACK = 8; + */ CLIENTACK(7, 8), + /** + * SHUTDOWN = 9; + * + *
+     * management part
+     * 
+ */ SHUTDOWN(8, 9), + /** + * DUMP = 10; + * + *
+     * integration
+     * 
+ */ DUMP(9, 10), + /** + * HEARTBEAT = 11; + */ HEARTBEAT(10, 11), + /** + * CLIENTROLLBACK = 12; + */ CLIENTROLLBACK(11, 12), ; - + + /** + * HANDSHAKE = 1; + */ public static final int HANDSHAKE_VALUE = 1; + /** + * CLIENTAUTHENTICATION = 2; + */ public static final int CLIENTAUTHENTICATION_VALUE = 2; + /** + * ACK = 3; + */ public static final int ACK_VALUE = 3; + /** + * SUBSCRIPTION = 4; + */ public static final int SUBSCRIPTION_VALUE = 4; + /** + * UNSUBSCRIPTION = 5; + */ public static final int UNSUBSCRIPTION_VALUE = 5; + /** + * GET = 6; + */ public static final int GET_VALUE = 6; + /** + * MESSAGES = 7; + */ public static final int MESSAGES_VALUE = 7; + /** + * CLIENTACK = 8; + */ public static final int CLIENTACK_VALUE = 8; + /** + * SHUTDOWN = 9; + * + *
+     * management part
+     * 
+ */ public static final int SHUTDOWN_VALUE = 9; + /** + * DUMP = 10; + * + *
+     * integration
+     * 
+ */ public static final int DUMP_VALUE = 10; + /** + * HEARTBEAT = 11; + */ public static final int HEARTBEAT_VALUE = 11; + /** + * CLIENTROLLBACK = 12; + */ public static final int CLIENTROLLBACK_VALUE = 12; - - + + public final int getNumber() { return value; } - + public static PacketType valueOf(int value) { switch (value) { case 1: return HANDSHAKE; @@ -132,7 +248,7 @@ public final class CanalPacket { default: return null; } } - + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; @@ -144,7 +260,7 @@ public final class CanalPacket { return PacketType.valueOf(number); } }; - + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); @@ -157,11 +273,9 @@ public final class CanalPacket { getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.getDescriptor().getEnumTypes().get(1); } - - private static final PacketType[] VALUES = { - HANDSHAKE, CLIENTAUTHENTICATION, ACK, SUBSCRIPTION, UNSUBSCRIPTION, GET, MESSAGES, CLIENTACK, SHUTDOWN, DUMP, HEARTBEAT, CLIENTROLLBACK, - }; - + + private static final PacketType[] VALUES = values(); + public static PacketType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { @@ -170,434 +284,116 @@ public final class CanalPacket { } return VALUES[desc.getIndex()]; } - + private final int index; private final int value; - + private PacketType(int index, int value) { this.index = index; this.value = value; } - + // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.PacketType) } - - public interface PacketOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int32 magic_number = 1 [default = 17]; + + public interface PacketOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Packet) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 magic_number = 1 [default = 17]; + */ boolean hasMagicNumber(); + /** + * optional int32 magic_number = 1 [default = 17]; + */ int getMagicNumber(); - - // optional int32 version = 2 [default = 1]; + + /** + * optional int32 version = 2 [default = 1]; + */ boolean hasVersion(); + /** + * optional int32 version = 2 [default = 1]; + */ int getVersion(); - - // optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + + /** + * optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + */ boolean hasType(); + /** + * optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + */ com.alibaba.otter.canal.protocol.CanalPacket.PacketType getType(); - - // optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + + /** + * optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + */ boolean hasCompression(); + /** + * optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + */ com.alibaba.otter.canal.protocol.CanalPacket.Compression getCompression(); - - // optional bytes body = 5; + + /** + * optional bytes body = 5; + */ boolean hasBody(); + /** + * optional bytes body = 5; + */ com.google.protobuf.ByteString getBody(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Packet} + */ public static final class Packet extends - com.google.protobuf.GeneratedMessage - implements PacketOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Packet) + PacketOrBuilder { // Use Packet.newBuilder() to construct. - private Packet(Builder builder) { + private Packet(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Packet(boolean noInit) {} - + private Packet(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final Packet defaultInstance; public static Packet getDefaultInstance() { return defaultInstance; } - + public Packet getDefaultInstanceForType() { return defaultInstance; } - - 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; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable; - } - - private int bitField0_; - // optional int32 magic_number = 1 [default = 17]; - public static final int MAGIC_NUMBER_FIELD_NUMBER = 1; - private int magicNumber_; - public boolean hasMagicNumber() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getMagicNumber() { - return magicNumber_; - } - - // optional int32 version = 2 [default = 1]; - public static final int VERSION_FIELD_NUMBER = 2; - private int version_; - public boolean hasVersion() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getVersion() { - return version_; - } - - // optional .com.alibaba.otter.canal.protocol.PacketType type = 3; - public static final int TYPE_FIELD_NUMBER = 3; - private com.alibaba.otter.canal.protocol.CanalPacket.PacketType type_; - public boolean hasType() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alibaba.otter.canal.protocol.CanalPacket.PacketType getType() { - return type_; - } - - // optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; - public static final int COMPRESSION_FIELD_NUMBER = 4; - private com.alibaba.otter.canal.protocol.CanalPacket.Compression compression_; - public boolean hasCompression() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alibaba.otter.canal.protocol.CanalPacket.Compression getCompression() { - return compression_; - } - - // optional bytes body = 5; - public static final int BODY_FIELD_NUMBER = 5; - private com.google.protobuf.ByteString body_; - public boolean hasBody() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.google.protobuf.ByteString getBody() { - return body_; - } - - private void initFields() { - magicNumber_ = 17; - version_ = 1; - type_ = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.HANDSHAKE; - compression_ = com.alibaba.otter.canal.protocol.CanalPacket.Compression.NONE; - body_ = com.google.protobuf.ByteString.EMPTY; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, magicNumber_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, version_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, type_.getNumber()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(4, compression_.getNumber()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, body_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, magicNumber_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, version_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, type_.getNumber()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, compression_.getNumber()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, body_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; + + private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( + private Packet( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Packet prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.PacketOrBuilder { - 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; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable; - } - - // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Packet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - magicNumber_ = 17; - bitField0_ = (bitField0_ & ~0x00000001); - version_ = 1; - bitField0_ = (bitField0_ & ~0x00000002); - type_ = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.HANDSHAKE; - bitField0_ = (bitField0_ & ~0x00000004); - compression_ = com.alibaba.otter.canal.protocol.CanalPacket.Compression.NONE; - bitField0_ = (bitField0_ & ~0x00000008); - body_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.Packet.getDescriptor(); - } - - public com.alibaba.otter.canal.protocol.CanalPacket.Packet getDefaultInstanceForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.Packet.getDefaultInstance(); - } - - public com.alibaba.otter.canal.protocol.CanalPacket.Packet build() { - com.alibaba.otter.canal.protocol.CanalPacket.Packet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private com.alibaba.otter.canal.protocol.CanalPacket.Packet buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.Packet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - 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); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.magicNumber_ = magicNumber_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.version_ = version_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.compression_ = compression_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.body_ = body_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Packet) { - return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.Packet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Packet other) { - if (other == com.alibaba.otter.canal.protocol.CanalPacket.Packet.getDefaultInstance()) return this; - if (other.hasMagicNumber()) { - setMagicNumber(other.getMagicNumber()); - } - if (other.hasVersion()) { - setVersion(other.getVersion()); - } - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasCompression()) { - setCompression(other.getCompression()); - } - if (other.hasBody()) { - setBody(other.getBody()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { + 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: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; + done = true; + break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; + done = true; } break; } @@ -640,60 +436,496 @@ public final class CanalPacket { } } } + } 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Packet.class, com.alibaba.otter.canal.protocol.CanalPacket.Packet.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Packet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Packet(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int MAGIC_NUMBER_FIELD_NUMBER = 1; + private int magicNumber_; + /** + * optional int32 magic_number = 1 [default = 17]; + */ + public boolean hasMagicNumber() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 magic_number = 1 [default = 17]; + */ + public int getMagicNumber() { + return magicNumber_; + } + + public static final int VERSION_FIELD_NUMBER = 2; + private int version_; + /** + * optional int32 version = 2 [default = 1]; + */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 version = 2 [default = 1]; + */ + public int getVersion() { + return version_; + } + + public static final int TYPE_FIELD_NUMBER = 3; + private com.alibaba.otter.canal.protocol.CanalPacket.PacketType type_; + /** + * optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + */ + public com.alibaba.otter.canal.protocol.CanalPacket.PacketType getType() { + return type_; + } + + public static final int COMPRESSION_FIELD_NUMBER = 4; + private com.alibaba.otter.canal.protocol.CanalPacket.Compression compression_; + /** + * optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + */ + public boolean hasCompression() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + */ + public com.alibaba.otter.canal.protocol.CanalPacket.Compression getCompression() { + return compression_; + } + + public static final int BODY_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString body_; + /** + * optional bytes body = 5; + */ + public boolean hasBody() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bytes body = 5; + */ + public com.google.protobuf.ByteString getBody() { + return body_; + } + + private void initFields() { + magicNumber_ = 17; + version_ = 1; + type_ = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.HANDSHAKE; + compression_ = com.alibaba.otter.canal.protocol.CanalPacket.Compression.NONE; + body_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, magicNumber_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, version_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, type_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, compression_.getNumber()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, body_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, magicNumber_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, version_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, compression_.getNumber()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, body_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(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 PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalPacket.Packet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Packet prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Packet} + */ + public static final class Builder extends + 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 + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Packet.class, com.alibaba.otter.canal.protocol.CanalPacket.Packet.Builder.class); + } + + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Packet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + 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(); + } + + public Builder clear() { + super.clear(); + magicNumber_ = 17; + bitField0_ = (bitField0_ & ~0x00000001); + version_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + type_ = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.HANDSHAKE; + bitField0_ = (bitField0_ & ~0x00000004); + compression_ = com.alibaba.otter.canal.protocol.CanalPacket.Compression.NONE; + bitField0_ = (bitField0_ & ~0x00000008); + body_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor; + } + + public com.alibaba.otter.canal.protocol.CanalPacket.Packet getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalPacket.Packet.getDefaultInstance(); + } + + public com.alibaba.otter.canal.protocol.CanalPacket.Packet build() { + com.alibaba.otter.canal.protocol.CanalPacket.Packet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + 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); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.magicNumber_ = magicNumber_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.version_ = version_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.compression_ = compression_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.body_ = body_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Packet) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.Packet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Packet other) { + if (other == com.alibaba.otter.canal.protocol.CanalPacket.Packet.getDefaultInstance()) return this; + if (other.hasMagicNumber()) { + setMagicNumber(other.getMagicNumber()); + } + if (other.hasVersion()) { + setVersion(other.getVersion()); + } + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasCompression()) { + setCompression(other.getCompression()); + } + if (other.hasBody()) { + setBody(other.getBody()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.alibaba.otter.canal.protocol.CanalPacket.Packet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Packet) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; } - private int bitField0_; - - // optional int32 magic_number = 1 [default = 17]; + private int magicNumber_ = 17; + /** + * optional int32 magic_number = 1 [default = 17]; + */ public boolean hasMagicNumber() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 magic_number = 1 [default = 17]; + */ public int getMagicNumber() { return magicNumber_; } + /** + * optional int32 magic_number = 1 [default = 17]; + */ public Builder setMagicNumber(int value) { bitField0_ |= 0x00000001; magicNumber_ = value; onChanged(); return this; } + /** + * optional int32 magic_number = 1 [default = 17]; + */ public Builder clearMagicNumber() { bitField0_ = (bitField0_ & ~0x00000001); magicNumber_ = 17; onChanged(); return this; } - - // optional int32 version = 2 [default = 1]; + private int version_ = 1; + /** + * optional int32 version = 2 [default = 1]; + */ public boolean hasVersion() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional int32 version = 2 [default = 1]; + */ public int getVersion() { return version_; } + /** + * optional int32 version = 2 [default = 1]; + */ public Builder setVersion(int value) { bitField0_ |= 0x00000002; version_ = value; onChanged(); return this; } + /** + * optional int32 version = 2 [default = 1]; + */ public Builder clearVersion() { bitField0_ = (bitField0_ & ~0x00000002); version_ = 1; onChanged(); return this; } - - // optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + private com.alibaba.otter.canal.protocol.CanalPacket.PacketType type_ = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.HANDSHAKE; + /** + * optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + */ public boolean hasType() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + */ public com.alibaba.otter.canal.protocol.CanalPacket.PacketType getType() { return type_; } + /** + * optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + */ public Builder setType(com.alibaba.otter.canal.protocol.CanalPacket.PacketType value) { if (value == null) { throw new NullPointerException(); @@ -703,21 +935,32 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional .com.alibaba.otter.canal.protocol.PacketType type = 3; + */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000004); type_ = com.alibaba.otter.canal.protocol.CanalPacket.PacketType.HANDSHAKE; onChanged(); return this; } - - // optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + private com.alibaba.otter.canal.protocol.CanalPacket.Compression compression_ = com.alibaba.otter.canal.protocol.CanalPacket.Compression.NONE; + /** + * optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + */ public boolean hasCompression() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + */ public com.alibaba.otter.canal.protocol.CanalPacket.Compression getCompression() { return compression_; } + /** + * optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + */ public Builder setCompression(com.alibaba.otter.canal.protocol.CanalPacket.Compression value) { if (value == null) { throw new NullPointerException(); @@ -727,21 +970,32 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional .com.alibaba.otter.canal.protocol.Compression compression = 4 [default = NONE]; + */ public Builder clearCompression() { bitField0_ = (bitField0_ & ~0x00000008); compression_ = com.alibaba.otter.canal.protocol.CanalPacket.Compression.NONE; onChanged(); return this; } - - // optional bytes body = 5; + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes body = 5; + */ public boolean hasBody() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional bytes body = 5; + */ public com.google.protobuf.ByteString getBody() { return body_; } + /** + * optional bytes body = 5; + */ public Builder setBody(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -751,84 +1005,181 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional bytes body = 5; + */ public Builder clearBody() { bitField0_ = (bitField0_ & ~0x00000010); body_ = getDefaultInstance().getBody(); onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Packet) } - + static { defaultInstance = new Packet(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Packet) } - - public interface HeartBeatOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int64 send_timestamp = 1; + + public interface HeartBeatOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.HeartBeat) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 send_timestamp = 1; + */ boolean hasSendTimestamp(); + /** + * optional int64 send_timestamp = 1; + */ long getSendTimestamp(); - - // optional int64 start_timestamp = 2; + + /** + * optional int64 start_timestamp = 2; + */ boolean hasStartTimestamp(); + /** + * optional int64 start_timestamp = 2; + */ long getStartTimestamp(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.HeartBeat} + */ public static final class HeartBeat extends - com.google.protobuf.GeneratedMessage - implements HeartBeatOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.HeartBeat) + HeartBeatOrBuilder { // Use HeartBeat.newBuilder() to construct. - private HeartBeat(Builder builder) { + private HeartBeat(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private HeartBeat(boolean noInit) {} - + private HeartBeat(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final HeartBeat defaultInstance; public static HeartBeat getDefaultInstance() { return defaultInstance; } - + public HeartBeat getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + sendTimestamp_ = input.readInt64(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + startTimestamp_ = 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 { + 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; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.class, com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public HeartBeat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HeartBeat(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional int64 send_timestamp = 1; public static final int SEND_TIMESTAMP_FIELD_NUMBER = 1; private long sendTimestamp_; + /** + * optional int64 send_timestamp = 1; + */ public boolean hasSendTimestamp() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 send_timestamp = 1; + */ public long getSendTimestamp() { return sendTimestamp_; } - - // optional int64 start_timestamp = 2; + public static final int START_TIMESTAMP_FIELD_NUMBER = 2; private long startTimestamp_; + /** + * optional int64 start_timestamp = 2; + */ public boolean hasStartTimestamp() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional int64 start_timestamp = 2; + */ public long getStartTimestamp() { return startTimestamp_; } - + private void initFields() { sendTimestamp_ = 0L; startTimestamp_ = 0L; @@ -836,12 +1187,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -853,12 +1205,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -872,113 +1224,106 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.HeartBeat} + */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.HeartBeatOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.class, com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -989,7 +1334,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); sendTimestamp_ = 0L; @@ -998,20 +1343,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat build() { com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat result = buildPartial(); if (!result.isInitialized()) { @@ -1019,17 +1364,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -1046,7 +1381,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat)other); @@ -1055,7 +1390,7 @@ public final class CanalPacket { return this; } } - + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat other) { if (other == com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.getDefaultInstance()) return this; if (other.hasSendTimestamp()) { @@ -1067,203 +1402,362 @@ public final class CanalPacket { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - sendTimestamp_ = input.readInt64(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - startTimestamp_ = input.readInt64(); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional int64 send_timestamp = 1; + private long sendTimestamp_ ; + /** + * optional int64 send_timestamp = 1; + */ public boolean hasSendTimestamp() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 send_timestamp = 1; + */ public long getSendTimestamp() { return sendTimestamp_; } + /** + * optional int64 send_timestamp = 1; + */ public Builder setSendTimestamp(long value) { bitField0_ |= 0x00000001; sendTimestamp_ = value; onChanged(); return this; } + /** + * optional int64 send_timestamp = 1; + */ public Builder clearSendTimestamp() { bitField0_ = (bitField0_ & ~0x00000001); sendTimestamp_ = 0L; onChanged(); return this; } - - // optional int64 start_timestamp = 2; + private long startTimestamp_ ; + /** + * optional int64 start_timestamp = 2; + */ public boolean hasStartTimestamp() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional int64 start_timestamp = 2; + */ public long getStartTimestamp() { return startTimestamp_; } + /** + * optional int64 start_timestamp = 2; + */ public Builder setStartTimestamp(long value) { bitField0_ |= 0x00000002; startTimestamp_ = value; onChanged(); return this; } + /** + * optional int64 start_timestamp = 2; + */ public Builder clearStartTimestamp() { bitField0_ = (bitField0_ & ~0x00000002); startTimestamp_ = 0L; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.HeartBeat) } - + static { defaultInstance = new HeartBeat(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.HeartBeat) } - - public interface HandshakeOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string communication_encoding = 1 [default = "utf8"]; + + public interface HandshakeOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Handshake) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ boolean hasCommunicationEncoding(); - String getCommunicationEncoding(); - - // optional bytes seeds = 2; + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ + java.lang.String getCommunicationEncoding(); + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ + com.google.protobuf.ByteString + getCommunicationEncodingBytes(); + + /** + * optional bytes seeds = 2; + */ boolean hasSeeds(); + /** + * optional bytes seeds = 2; + */ com.google.protobuf.ByteString getSeeds(); - - // repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ java.util.List getSupportedCompressionsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ int getSupportedCompressionsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ com.alibaba.otter.canal.protocol.CanalPacket.Compression getSupportedCompressions(int index); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Handshake} + */ public static final class Handshake extends - com.google.protobuf.GeneratedMessage - implements HandshakeOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Handshake) + HandshakeOrBuilder { // Use Handshake.newBuilder() to construct. - private Handshake(Builder builder) { + private Handshake(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Handshake(boolean noInit) {} - + private Handshake(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final Handshake defaultInstance; public static Handshake getDefaultInstance() { return defaultInstance; } - + public Handshake getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + communicationEncoding_ = bs; + break; + } + case 18: { + bitField0_ |= 0x00000002; + seeds_ = input.readBytes(); + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alibaba.otter.canal.protocol.CanalPacket.Compression value = com.alibaba.otter.canal.protocol.CanalPacket.Compression.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + supportedCompressions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + supportedCompressions_.add(value); + } + break; + } + case 26: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + com.alibaba.otter.canal.protocol.CanalPacket.Compression value = com.alibaba.otter.canal.protocol.CanalPacket.Compression.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + supportedCompressions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + supportedCompressions_.add(value); + } + } + input.popLimit(oldLimit); + 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)) { + supportedCompressions_ = java.util.Collections.unmodifiableList(supportedCompressions_); + } + 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; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Handshake.class, com.alibaba.otter.canal.protocol.CanalPacket.Handshake.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Handshake parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Handshake(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional string communication_encoding = 1 [default = "utf8"]; public static final int COMMUNICATION_ENCODING_FIELD_NUMBER = 1; private java.lang.Object communicationEncoding_; + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ public boolean hasCommunicationEncoding() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getCommunicationEncoding() { + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ + public java.lang.String getCommunicationEncoding() { java.lang.Object ref = communicationEncoding_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { communicationEncoding_ = s; } return s; } } - private com.google.protobuf.ByteString getCommunicationEncodingBytes() { + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ + public com.google.protobuf.ByteString + getCommunicationEncodingBytes() { java.lang.Object ref = communicationEncoding_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); communicationEncoding_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional bytes seeds = 2; + public static final int SEEDS_FIELD_NUMBER = 2; private com.google.protobuf.ByteString seeds_; + /** + * optional bytes seeds = 2; + */ public boolean hasSeeds() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional bytes seeds = 2; + */ public com.google.protobuf.ByteString getSeeds() { return seeds_; } - - // repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + public static final int SUPPORTED_COMPRESSIONS_FIELD_NUMBER = 3; private java.util.List supportedCompressions_; + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public java.util.List getSupportedCompressionsList() { return supportedCompressions_; } + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public int getSupportedCompressionsCount() { return supportedCompressions_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public com.alibaba.otter.canal.protocol.CanalPacket.Compression getSupportedCompressions(int index) { return supportedCompressions_.get(index); } - + private void initFields() { communicationEncoding_ = "utf8"; seeds_ = com.google.protobuf.ByteString.EMPTY; @@ -1272,12 +1766,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -1292,12 +1787,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -1320,113 +1815,106 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Handshake parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Handshake prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Handshake} + */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.HandshakeOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Handshake.class, com.alibaba.otter.canal.protocol.CanalPacket.Handshake.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Handshake.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -1437,7 +1925,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); communicationEncoding_ = "utf8"; @@ -1448,20 +1936,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.Handshake.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.Handshake getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.Handshake.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.Handshake build() { com.alibaba.otter.canal.protocol.CanalPacket.Handshake result = buildPartial(); if (!result.isInitialized()) { @@ -1469,17 +1957,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.Handshake buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.Handshake result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -1501,7 +1979,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Handshake) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.Handshake)other); @@ -1510,11 +1988,13 @@ public final class CanalPacket { return this; } } - + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Handshake other) { if (other == com.alibaba.otter.canal.protocol.CanalPacket.Handshake.getDefaultInstance()) return this; if (other.hasCommunicationEncoding()) { - setCommunicationEncoding(other.getCommunicationEncoding()); + bitField0_ |= 0x00000001; + communicationEncoding_ = other.communicationEncoding_; + onChanged(); } if (other.hasSeeds()) { setSeeds(other.getSeeds()); @@ -1532,91 +2012,75 @@ public final class CanalPacket { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - communicationEncoding_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - seeds_ = input.readBytes(); - break; - } - case 24: { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalPacket.Compression value = com.alibaba.otter.canal.protocol.CanalPacket.Compression.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - addSupportedCompressions(value); - } - break; - } - case 26: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalPacket.Compression value = com.alibaba.otter.canal.protocol.CanalPacket.Compression.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - addSupportedCompressions(value); - } - } - input.popLimit(oldLimit); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.Handshake parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Handshake) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional string communication_encoding = 1 [default = "utf8"]; + private java.lang.Object communicationEncoding_ = "utf8"; + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ public boolean hasCommunicationEncoding() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getCommunicationEncoding() { + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ + public java.lang.String getCommunicationEncoding() { java.lang.Object ref = communicationEncoding_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - communicationEncoding_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + communicationEncoding_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setCommunicationEncoding(String value) { + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ + public com.google.protobuf.ByteString + getCommunicationEncodingBytes() { + java.lang.Object ref = communicationEncoding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + communicationEncoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ + public Builder setCommunicationEncoding( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -1625,26 +2089,45 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ public Builder clearCommunicationEncoding() { bitField0_ = (bitField0_ & ~0x00000001); communicationEncoding_ = getDefaultInstance().getCommunicationEncoding(); onChanged(); return this; } - void setCommunicationEncoding(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string communication_encoding = 1 [default = "utf8"]; + */ + public Builder setCommunicationEncodingBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; communicationEncoding_ = value; onChanged(); + return this; } - - // optional bytes seeds = 2; + private com.google.protobuf.ByteString seeds_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes seeds = 2; + */ public boolean hasSeeds() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional bytes seeds = 2; + */ public com.google.protobuf.ByteString getSeeds() { return seeds_; } + /** + * optional bytes seeds = 2; + */ public Builder setSeeds(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -1654,14 +2137,16 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional bytes seeds = 2; + */ public Builder clearSeeds() { bitField0_ = (bitField0_ & ~0x00000002); seeds_ = getDefaultInstance().getSeeds(); onChanged(); return this; } - - // repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + private java.util.List supportedCompressions_ = java.util.Collections.emptyList(); private void ensureSupportedCompressionsIsMutable() { @@ -1670,15 +2155,27 @@ public final class CanalPacket { bitField0_ |= 0x00000004; } } + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public java.util.List getSupportedCompressionsList() { return java.util.Collections.unmodifiableList(supportedCompressions_); } + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public int getSupportedCompressionsCount() { return supportedCompressions_.size(); } + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public com.alibaba.otter.canal.protocol.CanalPacket.Compression getSupportedCompressions(int index) { return supportedCompressions_.get(index); } + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public Builder setSupportedCompressions( int index, com.alibaba.otter.canal.protocol.CanalPacket.Compression value) { if (value == null) { @@ -1689,6 +2186,9 @@ public final class CanalPacket { onChanged(); return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public Builder addSupportedCompressions(com.alibaba.otter.canal.protocol.CanalPacket.Compression value) { if (value == null) { throw new NullPointerException(); @@ -1698,263 +2198,550 @@ public final class CanalPacket { onChanged(); return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public Builder addAllSupportedCompressions( java.lang.Iterable values) { ensureSupportedCompressionsIsMutable(); - super.addAll(values, supportedCompressions_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, supportedCompressions_); onChanged(); return this; } + /** + * repeated .com.alibaba.otter.canal.protocol.Compression supported_compressions = 3; + */ public Builder clearSupportedCompressions() { supportedCompressions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Handshake) } - + static { defaultInstance = new Handshake(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Handshake) } - - public interface ClientAuthOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string username = 1; + + public interface ClientAuthOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.ClientAuth) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string username = 1; + */ boolean hasUsername(); - String getUsername(); - - // optional bytes password = 2; + /** + * optional string username = 1; + */ + java.lang.String getUsername(); + /** + * optional string username = 1; + */ + com.google.protobuf.ByteString + getUsernameBytes(); + + /** + * optional bytes password = 2; + * + *
+     * hashed password with seeds from Handshake message
+     * 
+ */ boolean hasPassword(); + /** + * optional bytes password = 2; + * + *
+     * hashed password with seeds from Handshake message
+     * 
+ */ com.google.protobuf.ByteString getPassword(); - - // optional int32 net_read_timeout = 3 [default = 0]; + + /** + * optional int32 net_read_timeout = 3 [default = 0]; + * + *
+     * in seconds
+     * 
+ */ boolean hasNetReadTimeout(); + /** + * optional int32 net_read_timeout = 3 [default = 0]; + * + *
+     * in seconds
+     * 
+ */ int getNetReadTimeout(); - - // optional int32 net_write_timeout = 4 [default = 0]; + + /** + * optional int32 net_write_timeout = 4 [default = 0]; + * + *
+     * in seconds
+     * 
+ */ boolean hasNetWriteTimeout(); + /** + * optional int32 net_write_timeout = 4 [default = 0]; + * + *
+     * in seconds
+     * 
+ */ int getNetWriteTimeout(); - - // optional string destination = 5; + + /** + * optional string destination = 5; + */ boolean hasDestination(); - String getDestination(); - - // optional string client_id = 6; + /** + * optional string destination = 5; + */ + java.lang.String getDestination(); + /** + * optional string destination = 5; + */ + com.google.protobuf.ByteString + getDestinationBytes(); + + /** + * optional string client_id = 6; + */ boolean hasClientId(); - String getClientId(); - - // optional string filter = 7; + /** + * optional string client_id = 6; + */ + java.lang.String getClientId(); + /** + * optional string client_id = 6; + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + * optional string filter = 7; + */ boolean hasFilter(); - String getFilter(); - - // optional int64 start_timestamp = 8; + /** + * optional string filter = 7; + */ + java.lang.String getFilter(); + /** + * optional string filter = 7; + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + * optional int64 start_timestamp = 8; + */ boolean hasStartTimestamp(); + /** + * optional int64 start_timestamp = 8; + */ long getStartTimestamp(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAuth} + * + *
+   * client authentication
+   * 
+ */ public static final class ClientAuth extends - com.google.protobuf.GeneratedMessage - implements ClientAuthOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ClientAuth) + ClientAuthOrBuilder { // Use ClientAuth.newBuilder() to construct. - private ClientAuth(Builder builder) { + private ClientAuth(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private ClientAuth(boolean noInit) {} - + private ClientAuth(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final ClientAuth defaultInstance; public static ClientAuth getDefaultInstance() { return defaultInstance; } - + public ClientAuth getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + username_ = bs; + break; + } + case 18: { + bitField0_ |= 0x00000002; + password_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + netReadTimeout_ = input.readInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + netWriteTimeout_ = input.readInt32(); + break; + } + case 42: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000010; + destination_ = bs; + break; + } + case 50: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000020; + clientId_ = bs; + break; + } + case 58: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000040; + filter_ = bs; + break; + } + case 64: { + bitField0_ |= 0x00000080; + startTimestamp_ = 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 { + 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; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.class, com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ClientAuth parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClientAuth(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional string username = 1; public static final int USERNAME_FIELD_NUMBER = 1; private java.lang.Object username_; + /** + * optional string username = 1; + */ public boolean hasUsername() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getUsername() { + /** + * optional string username = 1; + */ + public java.lang.String getUsername() { java.lang.Object ref = username_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { username_ = s; } return s; } } - private com.google.protobuf.ByteString getUsernameBytes() { + /** + * optional string username = 1; + */ + public com.google.protobuf.ByteString + getUsernameBytes() { java.lang.Object ref = username_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); username_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional bytes password = 2; + public static final int PASSWORD_FIELD_NUMBER = 2; private com.google.protobuf.ByteString password_; + /** + * optional bytes password = 2; + * + *
+     * hashed password with seeds from Handshake message
+     * 
+ */ public boolean hasPassword() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional bytes password = 2; + * + *
+     * hashed password with seeds from Handshake message
+     * 
+ */ public com.google.protobuf.ByteString getPassword() { return password_; } - - // optional int32 net_read_timeout = 3 [default = 0]; + public static final int NET_READ_TIMEOUT_FIELD_NUMBER = 3; private int netReadTimeout_; + /** + * optional int32 net_read_timeout = 3 [default = 0]; + * + *
+     * in seconds
+     * 
+ */ public boolean hasNetReadTimeout() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int32 net_read_timeout = 3 [default = 0]; + * + *
+     * in seconds
+     * 
+ */ public int getNetReadTimeout() { return netReadTimeout_; } - - // optional int32 net_write_timeout = 4 [default = 0]; + public static final int NET_WRITE_TIMEOUT_FIELD_NUMBER = 4; private int netWriteTimeout_; + /** + * optional int32 net_write_timeout = 4 [default = 0]; + * + *
+     * in seconds
+     * 
+ */ public boolean hasNetWriteTimeout() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional int32 net_write_timeout = 4 [default = 0]; + * + *
+     * in seconds
+     * 
+ */ public int getNetWriteTimeout() { return netWriteTimeout_; } - - // optional string destination = 5; + public static final int DESTINATION_FIELD_NUMBER = 5; private java.lang.Object destination_; + /** + * optional string destination = 5; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000010) == 0x00000010); } - public String getDestination() { + /** + * optional string destination = 5; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { destination_ = s; } return s; } } - private com.google.protobuf.ByteString getDestinationBytes() { + /** + * optional string destination = 5; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { java.lang.Object ref = destination_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); destination_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string client_id = 6; + public static final int CLIENT_ID_FIELD_NUMBER = 6; private java.lang.Object clientId_; + /** + * optional string client_id = 6; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000020) == 0x00000020); } - public String getClientId() { + /** + * optional string client_id = 6; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { clientId_ = s; } return s; } } - private com.google.protobuf.ByteString getClientIdBytes() { + /** + * optional string client_id = 6; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { java.lang.Object ref = clientId_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); clientId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string filter = 7; + public static final int FILTER_FIELD_NUMBER = 7; private java.lang.Object filter_; + /** + * optional string filter = 7; + */ public boolean hasFilter() { return ((bitField0_ & 0x00000040) == 0x00000040); } - public String getFilter() { + /** + * optional string filter = 7; + */ + public java.lang.String getFilter() { java.lang.Object ref = filter_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { filter_ = s; } return s; } } - private com.google.protobuf.ByteString getFilterBytes() { + /** + * optional string filter = 7; + */ + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional int64 start_timestamp = 8; + public static final int START_TIMESTAMP_FIELD_NUMBER = 8; private long startTimestamp_; + /** + * optional int64 start_timestamp = 8; + */ public boolean hasStartTimestamp() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** + * optional int64 start_timestamp = 8; + */ public long getStartTimestamp() { return startTimestamp_; } - + private void initFields() { username_ = ""; password_ = com.google.protobuf.ByteString.EMPTY; @@ -1968,12 +2755,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -2003,12 +2791,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -2046,113 +2834,110 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAuth} + * + *
+     * client authentication
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.ClientAuthOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.class, com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -2163,7 +2948,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); username_ = ""; @@ -2184,20 +2969,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000080); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth build() { com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth result = buildPartial(); if (!result.isInitialized()) { @@ -2205,17 +2990,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -2256,7 +3031,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth)other); @@ -2265,11 +3040,13 @@ public final class CanalPacket { return this; } } - + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth other) { if (other == com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.getDefaultInstance()) return this; if (other.hasUsername()) { - setUsername(other.getUsername()); + bitField0_ |= 0x00000001; + username_ = other.username_; + onChanged(); } if (other.hasPassword()) { setPassword(other.getPassword()); @@ -2281,13 +3058,19 @@ public final class CanalPacket { setNetWriteTimeout(other.getNetWriteTimeout()); } if (other.hasDestination()) { - setDestination(other.getDestination()); + bitField0_ |= 0x00000010; + destination_ = other.destination_; + onChanged(); } if (other.hasClientId()) { - setClientId(other.getClientId()); + bitField0_ |= 0x00000020; + clientId_ = other.clientId_; + onChanged(); } if (other.hasFilter()) { - setFilter(other.getFilter()); + bitField0_ |= 0x00000040; + filter_ = other.filter_; + onChanged(); } if (other.hasStartTimestamp()) { setStartTimestamp(other.getStartTimestamp()); @@ -2295,96 +3078,75 @@ public final class CanalPacket { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - username_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - password_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - netReadTimeout_ = input.readInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - netWriteTimeout_ = input.readInt32(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - destination_ = input.readBytes(); - break; - } - case 50: { - bitField0_ |= 0x00000020; - clientId_ = input.readBytes(); - break; - } - case 58: { - bitField0_ |= 0x00000040; - filter_ = input.readBytes(); - break; - } - case 64: { - bitField0_ |= 0x00000080; - startTimestamp_ = input.readInt64(); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional string username = 1; + private java.lang.Object username_ = ""; + /** + * optional string username = 1; + */ public boolean hasUsername() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getUsername() { + /** + * optional string username = 1; + */ + public java.lang.String getUsername() { java.lang.Object ref = username_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - username_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + username_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setUsername(String value) { + /** + * optional string username = 1; + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string username = 1; + */ + public Builder setUsername( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -2393,26 +3155,57 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string username = 1; + */ public Builder clearUsername() { bitField0_ = (bitField0_ & ~0x00000001); username_ = getDefaultInstance().getUsername(); onChanged(); return this; } - void setUsername(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string username = 1; + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; username_ = value; onChanged(); + return this; } - - // optional bytes password = 2; + private com.google.protobuf.ByteString password_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes password = 2; + * + *
+       * hashed password with seeds from Handshake message
+       * 
+ */ public boolean hasPassword() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional bytes password = 2; + * + *
+       * hashed password with seeds from Handshake message
+       * 
+ */ public com.google.protobuf.ByteString getPassword() { return password_; } + /** + * optional bytes password = 2; + * + *
+       * hashed password with seeds from Handshake message
+       * 
+ */ public Builder setPassword(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -2422,71 +3215,161 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional bytes password = 2; + * + *
+       * hashed password with seeds from Handshake message
+       * 
+ */ public Builder clearPassword() { bitField0_ = (bitField0_ & ~0x00000002); password_ = getDefaultInstance().getPassword(); onChanged(); return this; } - - // optional int32 net_read_timeout = 3 [default = 0]; + private int netReadTimeout_ ; + /** + * optional int32 net_read_timeout = 3 [default = 0]; + * + *
+       * in seconds
+       * 
+ */ public boolean hasNetReadTimeout() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int32 net_read_timeout = 3 [default = 0]; + * + *
+       * in seconds
+       * 
+ */ public int getNetReadTimeout() { return netReadTimeout_; } + /** + * optional int32 net_read_timeout = 3 [default = 0]; + * + *
+       * in seconds
+       * 
+ */ public Builder setNetReadTimeout(int value) { bitField0_ |= 0x00000004; netReadTimeout_ = value; onChanged(); return this; } + /** + * optional int32 net_read_timeout = 3 [default = 0]; + * + *
+       * in seconds
+       * 
+ */ public Builder clearNetReadTimeout() { bitField0_ = (bitField0_ & ~0x00000004); netReadTimeout_ = 0; onChanged(); return this; } - - // optional int32 net_write_timeout = 4 [default = 0]; + private int netWriteTimeout_ ; + /** + * optional int32 net_write_timeout = 4 [default = 0]; + * + *
+       * in seconds
+       * 
+ */ public boolean hasNetWriteTimeout() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional int32 net_write_timeout = 4 [default = 0]; + * + *
+       * in seconds
+       * 
+ */ public int getNetWriteTimeout() { return netWriteTimeout_; } + /** + * optional int32 net_write_timeout = 4 [default = 0]; + * + *
+       * in seconds
+       * 
+ */ public Builder setNetWriteTimeout(int value) { bitField0_ |= 0x00000008; netWriteTimeout_ = value; onChanged(); return this; } + /** + * optional int32 net_write_timeout = 4 [default = 0]; + * + *
+       * in seconds
+       * 
+ */ public Builder clearNetWriteTimeout() { bitField0_ = (bitField0_ & ~0x00000008); netWriteTimeout_ = 0; onChanged(); return this; } - - // optional string destination = 5; + private java.lang.Object destination_ = ""; + /** + * optional string destination = 5; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000010) == 0x00000010); } - public String getDestination() { + /** + * optional string destination = 5; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - destination_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + destination_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setDestination(String value) { + /** + * optional string destination = 5; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string destination = 5; + */ + public Builder setDestination( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -2495,34 +3378,74 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string destination = 5; + */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000010); destination_ = getDefaultInstance().getDestination(); onChanged(); return this; } - void setDestination(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000010; + /** + * optional string destination = 5; + */ + public Builder setDestinationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; destination_ = value; onChanged(); + return this; } - - // optional string client_id = 6; + private java.lang.Object clientId_ = ""; + /** + * optional string client_id = 6; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000020) == 0x00000020); } - public String getClientId() { + /** + * optional string client_id = 6; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - clientId_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + clientId_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setClientId(String value) { + /** + * optional string client_id = 6; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string client_id = 6; + */ + public Builder setClientId( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -2531,34 +3454,74 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string client_id = 6; + */ public Builder clearClientId() { bitField0_ = (bitField0_ & ~0x00000020); clientId_ = getDefaultInstance().getClientId(); onChanged(); return this; } - void setClientId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000020; + /** + * optional string client_id = 6; + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; clientId_ = value; onChanged(); + return this; } - - // optional string filter = 7; + private java.lang.Object filter_ = ""; + /** + * optional string filter = 7; + */ public boolean hasFilter() { return ((bitField0_ & 0x00000040) == 0x00000040); } - public String getFilter() { + /** + * optional string filter = 7; + */ + public java.lang.String getFilter() { java.lang.Object ref = filter_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - filter_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + filter_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setFilter(String value) { + /** + * optional string filter = 7; + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string filter = 7; + */ + public Builder setFilter( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -2567,132 +3530,283 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string filter = 7; + */ public Builder clearFilter() { bitField0_ = (bitField0_ & ~0x00000040); filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } - void setFilter(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000040; + /** + * optional string filter = 7; + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; filter_ = value; onChanged(); + return this; } - - // optional int64 start_timestamp = 8; + private long startTimestamp_ ; + /** + * optional int64 start_timestamp = 8; + */ public boolean hasStartTimestamp() { return ((bitField0_ & 0x00000080) == 0x00000080); } + /** + * optional int64 start_timestamp = 8; + */ public long getStartTimestamp() { return startTimestamp_; } + /** + * optional int64 start_timestamp = 8; + */ public Builder setStartTimestamp(long value) { bitField0_ |= 0x00000080; startTimestamp_ = value; onChanged(); return this; } + /** + * optional int64 start_timestamp = 8; + */ public Builder clearStartTimestamp() { bitField0_ = (bitField0_ & ~0x00000080); startTimestamp_ = 0L; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.ClientAuth) } - + static { defaultInstance = new ClientAuth(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.ClientAuth) } - - public interface AckOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int32 error_code = 1 [default = 0]; + + public interface AckOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Ack) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 error_code = 1 [default = 0]; + */ boolean hasErrorCode(); + /** + * optional int32 error_code = 1 [default = 0]; + */ int getErrorCode(); - - // optional string error_message = 2; + + /** + * optional string error_message = 2; + * + *
+     * if something like compression is not supported, erorr_message will tell about it.
+     * 
+ */ boolean hasErrorMessage(); - String getErrorMessage(); + /** + * optional string error_message = 2; + * + *
+     * if something like compression is not supported, erorr_message will tell about it.
+     * 
+ */ + java.lang.String getErrorMessage(); + /** + * optional string error_message = 2; + * + *
+     * if something like compression is not supported, erorr_message will tell about it.
+     * 
+ */ + com.google.protobuf.ByteString + getErrorMessageBytes(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Ack} + */ public static final class Ack extends - com.google.protobuf.GeneratedMessage - implements AckOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Ack) + AckOrBuilder { // Use Ack.newBuilder() to construct. - private Ack(Builder builder) { + private Ack(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Ack(boolean noInit) {} - + private Ack(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final Ack defaultInstance; public static Ack getDefaultInstance() { return defaultInstance; } - + public Ack getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + errorCode_ = input.readInt32(); + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + errorMessage_ = 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Ack.class, com.alibaba.otter.canal.protocol.CanalPacket.Ack.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Ack parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Ack(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional int32 error_code = 1 [default = 0]; public static final int ERROR_CODE_FIELD_NUMBER = 1; private int errorCode_; + /** + * optional int32 error_code = 1 [default = 0]; + */ public boolean hasErrorCode() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 error_code = 1 [default = 0]; + */ public int getErrorCode() { return errorCode_; } - - // optional string error_message = 2; + public static final int ERROR_MESSAGE_FIELD_NUMBER = 2; private java.lang.Object errorMessage_; + /** + * optional string error_message = 2; + * + *
+     * if something like compression is not supported, erorr_message will tell about it.
+     * 
+ */ public boolean hasErrorMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getErrorMessage() { + /** + * optional string error_message = 2; + * + *
+     * if something like compression is not supported, erorr_message will tell about it.
+     * 
+ */ + public java.lang.String getErrorMessage() { java.lang.Object ref = errorMessage_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { errorMessage_ = s; } return s; } } - private com.google.protobuf.ByteString getErrorMessageBytes() { + /** + * optional string error_message = 2; + * + *
+     * if something like compression is not supported, erorr_message will tell about it.
+     * 
+ */ + public com.google.protobuf.ByteString + getErrorMessageBytes() { java.lang.Object ref = errorMessage_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); errorMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + private void initFields() { errorCode_ = 0; errorMessage_ = ""; @@ -2700,12 +3814,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -2717,12 +3832,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -2736,113 +3851,106 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Ack parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Ack prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Ack} + */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.AckOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Ack.class, com.alibaba.otter.canal.protocol.CanalPacket.Ack.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Ack.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -2853,7 +3961,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); errorCode_ = 0; @@ -2862,20 +3970,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.Ack.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.Ack getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.Ack.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.Ack build() { com.alibaba.otter.canal.protocol.CanalPacket.Ack result = buildPartial(); if (!result.isInitialized()) { @@ -2883,17 +3991,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.Ack buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.Ack result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -2910,7 +4008,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Ack) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.Ack)other); @@ -2919,99 +4017,137 @@ public final class CanalPacket { return this; } } - + 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.hasErrorCode()) { setErrorCode(other.getErrorCode()); } if (other.hasErrorMessage()) { - setErrorMessage(other.getErrorMessage()); + bitField0_ |= 0x00000002; + errorMessage_ = other.errorMessage_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - errorCode_ = input.readInt32(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - errorMessage_ = input.readBytes(); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.Ack parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Ack) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional int32 error_code = 1 [default = 0]; + private int errorCode_ ; + /** + * optional int32 error_code = 1 [default = 0]; + */ public boolean hasErrorCode() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int32 error_code = 1 [default = 0]; + */ public int getErrorCode() { return errorCode_; } + /** + * optional int32 error_code = 1 [default = 0]; + */ public Builder setErrorCode(int value) { bitField0_ |= 0x00000001; errorCode_ = value; onChanged(); return this; } + /** + * optional int32 error_code = 1 [default = 0]; + */ public Builder clearErrorCode() { bitField0_ = (bitField0_ & ~0x00000001); errorCode_ = 0; onChanged(); return this; } - - // optional string error_message = 2; + private java.lang.Object errorMessage_ = ""; + /** + * optional string error_message = 2; + * + *
+       * if something like compression is not supported, erorr_message will tell about it.
+       * 
+ */ public boolean hasErrorMessage() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getErrorMessage() { + /** + * optional string error_message = 2; + * + *
+       * if something like compression is not supported, erorr_message will tell about it.
+       * 
+ */ + public java.lang.String getErrorMessage() { java.lang.Object ref = errorMessage_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - errorMessage_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + errorMessage_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setErrorMessage(String value) { + /** + * optional string error_message = 2; + * + *
+       * if something like compression is not supported, erorr_message will tell about it.
+       * 
+ */ + public com.google.protobuf.ByteString + getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string error_message = 2; + * + *
+       * if something like compression is not supported, erorr_message will tell about it.
+       * 
+ */ + public Builder setErrorMessage( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -3020,147 +4156,297 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string error_message = 2; + * + *
+       * if something like compression is not supported, erorr_message will tell about it.
+       * 
+ */ public Builder clearErrorMessage() { bitField0_ = (bitField0_ & ~0x00000002); errorMessage_ = getDefaultInstance().getErrorMessage(); onChanged(); return this; } - void setErrorMessage(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string error_message = 2; + * + *
+       * if something like compression is not supported, erorr_message will tell about it.
+       * 
+ */ + public Builder setErrorMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; errorMessage_ = value; onChanged(); + return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Ack) } - + static { defaultInstance = new Ack(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Ack) } - - public interface ClientAckOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string destination = 1; + + public interface ClientAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.ClientAck) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string destination = 1; + */ boolean hasDestination(); - String getDestination(); - - // optional string client_id = 2; + /** + * optional string destination = 1; + */ + java.lang.String getDestination(); + /** + * optional string destination = 1; + */ + com.google.protobuf.ByteString + getDestinationBytes(); + + /** + * optional string client_id = 2; + */ boolean hasClientId(); - String getClientId(); - - // optional int64 batch_id = 3; + /** + * optional string client_id = 2; + */ + java.lang.String getClientId(); + /** + * optional string client_id = 2; + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + * optional int64 batch_id = 3; + */ boolean hasBatchId(); + /** + * optional int64 batch_id = 3; + */ long getBatchId(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAck} + */ public static final class ClientAck extends - com.google.protobuf.GeneratedMessage - implements ClientAckOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ClientAck) + ClientAckOrBuilder { // Use ClientAck.newBuilder() to construct. - private ClientAck(Builder builder) { + private ClientAck(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private ClientAck(boolean noInit) {} - + private ClientAck(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final ClientAck defaultInstance; public static ClientAck getDefaultInstance() { return defaultInstance; } - + public ClientAck getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + destination_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + clientId_ = bs; + break; + } + case 24: { + bitField0_ |= 0x00000004; + batchId_ = 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 { + 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; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.class, com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ClientAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClientAck(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional string destination = 1; public static final int DESTINATION_FIELD_NUMBER = 1; private java.lang.Object destination_; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { destination_ = s; } return s; } } - private com.google.protobuf.ByteString getDestinationBytes() { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { java.lang.Object ref = destination_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); destination_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string client_id = 2; + public static final int CLIENT_ID_FIELD_NUMBER = 2; private java.lang.Object clientId_; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { clientId_ = s; } return s; } } - private com.google.protobuf.ByteString getClientIdBytes() { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { java.lang.Object ref = clientId_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); clientId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional int64 batch_id = 3; + public static final int BATCH_ID_FIELD_NUMBER = 3; private long batchId_; + /** + * optional int64 batch_id = 3; + */ public boolean hasBatchId() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int64 batch_id = 3; + */ public long getBatchId() { return batchId_; } - + private void initFields() { destination_ = ""; clientId_ = ""; @@ -3169,12 +4455,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -3189,12 +4476,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -3212,113 +4499,106 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.ClientAck prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientAck} + */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.ClientAckOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.class, com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -3329,7 +4609,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); destination_ = ""; @@ -3340,20 +4620,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.ClientAck getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.ClientAck build() { com.alibaba.otter.canal.protocol.CanalPacket.ClientAck result = buildPartial(); if (!result.isInitialized()) { @@ -3361,17 +4641,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.ClientAck buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.ClientAck result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -3392,7 +4662,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.ClientAck) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.ClientAck)other); @@ -3401,14 +4671,18 @@ public final class CanalPacket { return this; } } - + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.ClientAck other) { if (other == com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.getDefaultInstance()) return this; if (other.hasDestination()) { - setDestination(other.getDestination()); + bitField0_ |= 0x00000001; + destination_ = other.destination_; + onChanged(); } if (other.hasClientId()) { - setClientId(other.getClientId()); + bitField0_ |= 0x00000002; + clientId_ = other.clientId_; + onChanged(); } if (other.hasBatchId()) { setBatchId(other.getBatchId()); @@ -3416,71 +4690,75 @@ public final class CanalPacket { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - destination_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - clientId_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - batchId_ = input.readInt64(); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.ClientAck parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.ClientAck) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional string destination = 1; + private java.lang.Object destination_ = ""; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - destination_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + destination_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setDestination(String value) { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string destination = 1; + */ + public Builder setDestination( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -3489,34 +4767,74 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string destination = 1; + */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000001); destination_ = getDefaultInstance().getDestination(); onChanged(); return this; } - void setDestination(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string destination = 1; + */ + public Builder setDestinationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; destination_ = value; onChanged(); + return this; } - - // optional string client_id = 2; + private java.lang.Object clientId_ = ""; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - clientId_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + clientId_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setClientId(String value) { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string client_id = 2; + */ + public Builder setClientId( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -3525,190 +4843,358 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string client_id = 2; + */ public Builder clearClientId() { bitField0_ = (bitField0_ & ~0x00000002); clientId_ = getDefaultInstance().getClientId(); onChanged(); return this; } - void setClientId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string client_id = 2; + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; clientId_ = value; onChanged(); + return this; } - - // optional int64 batch_id = 3; + private long batchId_ ; + /** + * optional int64 batch_id = 3; + */ public boolean hasBatchId() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int64 batch_id = 3; + */ public long getBatchId() { return batchId_; } + /** + * optional int64 batch_id = 3; + */ public Builder setBatchId(long value) { bitField0_ |= 0x00000004; batchId_ = value; onChanged(); return this; } + /** + * optional int64 batch_id = 3; + */ public Builder clearBatchId() { bitField0_ = (bitField0_ & ~0x00000004); batchId_ = 0L; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.ClientAck) } - + static { defaultInstance = new ClientAck(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.ClientAck) } - - public interface SubOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string destination = 1; + + public interface SubOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Sub) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string destination = 1; + */ boolean hasDestination(); - String getDestination(); - - // optional string client_id = 2; + /** + * optional string destination = 1; + */ + java.lang.String getDestination(); + /** + * optional string destination = 1; + */ + com.google.protobuf.ByteString + getDestinationBytes(); + + /** + * optional string client_id = 2; + */ boolean hasClientId(); - String getClientId(); - - // optional string filter = 7; + /** + * optional string client_id = 2; + */ + java.lang.String getClientId(); + /** + * optional string client_id = 2; + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + * optional string filter = 7; + */ boolean hasFilter(); - String getFilter(); + /** + * optional string filter = 7; + */ + java.lang.String getFilter(); + /** + * optional string filter = 7; + */ + com.google.protobuf.ByteString + getFilterBytes(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Sub} + * + *
+   * subscription
+   * 
+ */ public static final class Sub extends - com.google.protobuf.GeneratedMessage - implements SubOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Sub) + SubOrBuilder { // Use Sub.newBuilder() to construct. - private Sub(Builder builder) { + private Sub(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Sub(boolean noInit) {} - + private Sub(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final Sub defaultInstance; public static Sub getDefaultInstance() { return defaultInstance; } - + public Sub getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + destination_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + clientId_ = bs; + break; + } + case 58: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + filter_ = 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Sub.class, com.alibaba.otter.canal.protocol.CanalPacket.Sub.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Sub parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Sub(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional string destination = 1; public static final int DESTINATION_FIELD_NUMBER = 1; private java.lang.Object destination_; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { destination_ = s; } return s; } } - private com.google.protobuf.ByteString getDestinationBytes() { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { java.lang.Object ref = destination_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); destination_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string client_id = 2; + public static final int CLIENT_ID_FIELD_NUMBER = 2; private java.lang.Object clientId_; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { clientId_ = s; } return s; } } - private com.google.protobuf.ByteString getClientIdBytes() { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { java.lang.Object ref = clientId_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); clientId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string filter = 7; + public static final int FILTER_FIELD_NUMBER = 7; private java.lang.Object filter_; + /** + * optional string filter = 7; + */ public boolean hasFilter() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getFilter() { + /** + * optional string filter = 7; + */ + public java.lang.String getFilter() { java.lang.Object ref = filter_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { filter_ = s; } return s; } } - private com.google.protobuf.ByteString getFilterBytes() { + /** + * optional string filter = 7; + */ + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + private void initFields() { destination_ = ""; clientId_ = ""; @@ -3717,12 +5203,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -3737,12 +5224,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -3760,113 +5247,110 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Sub parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Sub prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Sub} + * + *
+     * subscription
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.SubOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Sub.class, com.alibaba.otter.canal.protocol.CanalPacket.Sub.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Sub.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -3877,7 +5361,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); destination_ = ""; @@ -3888,20 +5372,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.Sub.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.Sub getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.Sub.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.Sub build() { com.alibaba.otter.canal.protocol.CanalPacket.Sub result = buildPartial(); if (!result.isInitialized()) { @@ -3909,17 +5393,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.Sub buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.Sub result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -3940,7 +5414,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Sub) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.Sub)other); @@ -3949,86 +5423,96 @@ public final class CanalPacket { return this; } } - + 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.hasDestination()) { - setDestination(other.getDestination()); + bitField0_ |= 0x00000001; + destination_ = other.destination_; + onChanged(); } if (other.hasClientId()) { - setClientId(other.getClientId()); + bitField0_ |= 0x00000002; + clientId_ = other.clientId_; + onChanged(); } if (other.hasFilter()) { - setFilter(other.getFilter()); + bitField0_ |= 0x00000004; + filter_ = other.filter_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - destination_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - clientId_ = input.readBytes(); - break; - } - case 58: { - bitField0_ |= 0x00000004; - filter_ = input.readBytes(); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.Sub parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Sub) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional string destination = 1; + private java.lang.Object destination_ = ""; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - destination_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + destination_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setDestination(String value) { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string destination = 1; + */ + public Builder setDestination( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -4037,34 +5521,74 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string destination = 1; + */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000001); destination_ = getDefaultInstance().getDestination(); onChanged(); return this; } - void setDestination(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string destination = 1; + */ + public Builder setDestinationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; destination_ = value; onChanged(); + return this; } - - // optional string client_id = 2; + private java.lang.Object clientId_ = ""; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - clientId_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + clientId_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setClientId(String value) { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string client_id = 2; + */ + public Builder setClientId( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -4073,34 +5597,74 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string client_id = 2; + */ public Builder clearClientId() { bitField0_ = (bitField0_ & ~0x00000002); clientId_ = getDefaultInstance().getClientId(); onChanged(); return this; } - void setClientId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string client_id = 2; + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; clientId_ = value; onChanged(); + return this; } - - // optional string filter = 7; + private java.lang.Object filter_ = ""; + /** + * optional string filter = 7; + */ public boolean hasFilter() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getFilter() { + /** + * optional string filter = 7; + */ + public java.lang.String getFilter() { java.lang.Object ref = filter_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - filter_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + filter_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setFilter(String value) { + /** + * optional string filter = 7; + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string filter = 7; + */ + public Builder setFilter( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -4109,169 +5673,326 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string filter = 7; + */ public Builder clearFilter() { bitField0_ = (bitField0_ & ~0x00000004); filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } - void setFilter(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; + /** + * optional string filter = 7; + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; filter_ = value; onChanged(); + return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Sub) } - + static { defaultInstance = new Sub(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Sub) } - - public interface UnsubOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string destination = 1; + + public interface UnsubOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Unsub) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string destination = 1; + */ boolean hasDestination(); - String getDestination(); - - // optional string client_id = 2; + /** + * optional string destination = 1; + */ + java.lang.String getDestination(); + /** + * optional string destination = 1; + */ + com.google.protobuf.ByteString + getDestinationBytes(); + + /** + * optional string client_id = 2; + */ boolean hasClientId(); - String getClientId(); - - // optional string filter = 7; + /** + * optional string client_id = 2; + */ + java.lang.String getClientId(); + /** + * optional string client_id = 2; + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + * optional string filter = 7; + */ boolean hasFilter(); - String getFilter(); + /** + * optional string filter = 7; + */ + java.lang.String getFilter(); + /** + * optional string filter = 7; + */ + com.google.protobuf.ByteString + getFilterBytes(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Unsub} + * + *
+   * Unsubscription
+   * 
+ */ public static final class Unsub extends - com.google.protobuf.GeneratedMessage - implements UnsubOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Unsub) + UnsubOrBuilder { // Use Unsub.newBuilder() to construct. - private Unsub(Builder builder) { + private Unsub(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Unsub(boolean noInit) {} - + private Unsub(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final Unsub defaultInstance; public static Unsub getDefaultInstance() { return defaultInstance; } - + public Unsub getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + destination_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + clientId_ = bs; + break; + } + case 58: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + filter_ = 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Unsub.class, com.alibaba.otter.canal.protocol.CanalPacket.Unsub.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Unsub parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Unsub(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional string destination = 1; public static final int DESTINATION_FIELD_NUMBER = 1; private java.lang.Object destination_; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { destination_ = s; } return s; } } - private com.google.protobuf.ByteString getDestinationBytes() { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { java.lang.Object ref = destination_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); destination_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string client_id = 2; + public static final int CLIENT_ID_FIELD_NUMBER = 2; private java.lang.Object clientId_; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { clientId_ = s; } return s; } } - private com.google.protobuf.ByteString getClientIdBytes() { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { java.lang.Object ref = clientId_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); clientId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string filter = 7; + public static final int FILTER_FIELD_NUMBER = 7; private java.lang.Object filter_; + /** + * optional string filter = 7; + */ public boolean hasFilter() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getFilter() { + /** + * optional string filter = 7; + */ + public java.lang.String getFilter() { java.lang.Object ref = filter_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { filter_ = s; } return s; } } - private com.google.protobuf.ByteString getFilterBytes() { + /** + * optional string filter = 7; + */ + public com.google.protobuf.ByteString + getFilterBytes() { java.lang.Object ref = filter_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); filter_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - + private void initFields() { destination_ = ""; clientId_ = ""; @@ -4280,12 +6001,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -4300,12 +6022,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -4323,113 +6045,110 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Unsub parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Unsub prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Unsub} + * + *
+     * Unsubscription
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.UnsubOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Unsub.class, com.alibaba.otter.canal.protocol.CanalPacket.Unsub.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Unsub.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -4440,7 +6159,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); destination_ = ""; @@ -4451,20 +6170,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.Unsub.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.Unsub getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.Unsub.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.Unsub build() { com.alibaba.otter.canal.protocol.CanalPacket.Unsub result = buildPartial(); if (!result.isInitialized()) { @@ -4472,17 +6191,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.Unsub buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.Unsub result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -4503,7 +6212,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Unsub) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.Unsub)other); @@ -4512,86 +6221,96 @@ public final class CanalPacket { return this; } } - + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Unsub other) { if (other == com.alibaba.otter.canal.protocol.CanalPacket.Unsub.getDefaultInstance()) return this; if (other.hasDestination()) { - setDestination(other.getDestination()); + bitField0_ |= 0x00000001; + destination_ = other.destination_; + onChanged(); } if (other.hasClientId()) { - setClientId(other.getClientId()); + bitField0_ |= 0x00000002; + clientId_ = other.clientId_; + onChanged(); } if (other.hasFilter()) { - setFilter(other.getFilter()); + bitField0_ |= 0x00000004; + filter_ = other.filter_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - destination_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - clientId_ = input.readBytes(); - break; - } - case 58: { - bitField0_ |= 0x00000004; - filter_ = input.readBytes(); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.Unsub parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Unsub) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional string destination = 1; + private java.lang.Object destination_ = ""; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - destination_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + destination_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setDestination(String value) { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string destination = 1; + */ + public Builder setDestination( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -4600,34 +6319,74 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string destination = 1; + */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000001); destination_ = getDefaultInstance().getDestination(); onChanged(); return this; } - void setDestination(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string destination = 1; + */ + public Builder setDestinationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; destination_ = value; onChanged(); + return this; } - - // optional string client_id = 2; + private java.lang.Object clientId_ = ""; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - clientId_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + clientId_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setClientId(String value) { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string client_id = 2; + */ + public Builder setClientId( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -4636,34 +6395,74 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string client_id = 2; + */ public Builder clearClientId() { bitField0_ = (bitField0_ & ~0x00000002); clientId_ = getDefaultInstance().getClientId(); onChanged(); return this; } - void setClientId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string client_id = 2; + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; clientId_ = value; onChanged(); + return this; } - - // optional string filter = 7; + private java.lang.Object filter_ = ""; + /** + * optional string filter = 7; + */ public boolean hasFilter() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getFilter() { + /** + * optional string filter = 7; + */ + public java.lang.String getFilter() { java.lang.Object ref = filter_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - filter_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + filter_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setFilter(String value) { + /** + * optional string filter = 7; + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string filter = 7; + */ + public Builder setFilter( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -4672,189 +6471,428 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string filter = 7; + */ public Builder clearFilter() { bitField0_ = (bitField0_ & ~0x00000004); filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } - void setFilter(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; + /** + * optional string filter = 7; + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; filter_ = value; onChanged(); + return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Unsub) } - + static { defaultInstance = new Unsub(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Unsub) } - - public interface GetOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string destination = 1; + + public interface GetOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Get) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string destination = 1; + */ boolean hasDestination(); - String getDestination(); - - // optional string client_id = 2; + /** + * optional string destination = 1; + */ + java.lang.String getDestination(); + /** + * optional string destination = 1; + */ + com.google.protobuf.ByteString + getDestinationBytes(); + + /** + * optional string client_id = 2; + */ boolean hasClientId(); - String getClientId(); - - // optional int32 fetch_size = 3; + /** + * optional string client_id = 2; + */ + java.lang.String getClientId(); + /** + * optional string client_id = 2; + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + * optional int32 fetch_size = 3; + */ boolean hasFetchSize(); + /** + * optional int32 fetch_size = 3; + */ int getFetchSize(); - - // optional int64 timeout = 4 [default = -1]; + + /** + * optional int64 timeout = 4 [default = -1]; + * + *
+     * 默认-1时代表不控制
+     * 
+ */ boolean hasTimeout(); + /** + * optional int64 timeout = 4 [default = -1]; + * + *
+     * 默认-1时代表不控制
+     * 
+ */ long getTimeout(); - - // optional int32 unit = 5 [default = 2]; + + /** + * optional int32 unit = 5 [default = 2]; + * + *
+     * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+     * 
+ */ boolean hasUnit(); + /** + * optional int32 unit = 5 [default = 2]; + * + *
+     * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+     * 
+ */ int getUnit(); - - // optional bool auto_ack = 6 [default = false]; + + /** + * optional bool auto_ack = 6 [default = false]; + * + *
+     * 是否自动ack
+     * 
+ */ boolean hasAutoAck(); + /** + * optional bool auto_ack = 6 [default = false]; + * + *
+     * 是否自动ack
+     * 
+ */ boolean getAutoAck(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Get} + * + *
+   *  PullRequest
+   * 
+ */ public static final class Get extends - com.google.protobuf.GeneratedMessage - implements GetOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Get) + GetOrBuilder { // Use Get.newBuilder() to construct. - private Get(Builder builder) { + private Get(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Get(boolean noInit) {} - + private Get(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final Get defaultInstance; public static Get getDefaultInstance() { return defaultInstance; } - + public Get getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + destination_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + clientId_ = bs; + break; + } + case 24: { + bitField0_ |= 0x00000004; + fetchSize_ = input.readInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + timeout_ = input.readInt64(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + unit_ = input.readInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + autoAck_ = input.readBool(); + 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 com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Get.class, com.alibaba.otter.canal.protocol.CanalPacket.Get.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Get parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Get(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional string destination = 1; public static final int DESTINATION_FIELD_NUMBER = 1; private java.lang.Object destination_; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { destination_ = s; } return s; } } - private com.google.protobuf.ByteString getDestinationBytes() { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { java.lang.Object ref = destination_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); destination_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string client_id = 2; + public static final int CLIENT_ID_FIELD_NUMBER = 2; private java.lang.Object clientId_; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { clientId_ = s; } return s; } } - private com.google.protobuf.ByteString getClientIdBytes() { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { java.lang.Object ref = clientId_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); clientId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional int32 fetch_size = 3; + public static final int FETCH_SIZE_FIELD_NUMBER = 3; private int fetchSize_; + /** + * optional int32 fetch_size = 3; + */ public boolean hasFetchSize() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int32 fetch_size = 3; + */ public int getFetchSize() { return fetchSize_; } - - // optional int64 timeout = 4 [default = -1]; + public static final int TIMEOUT_FIELD_NUMBER = 4; private long timeout_; + /** + * optional int64 timeout = 4 [default = -1]; + * + *
+     * 默认-1时代表不控制
+     * 
+ */ public boolean hasTimeout() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional int64 timeout = 4 [default = -1]; + * + *
+     * 默认-1时代表不控制
+     * 
+ */ public long getTimeout() { return timeout_; } - - // optional int32 unit = 5 [default = 2]; + public static final int UNIT_FIELD_NUMBER = 5; private int unit_; + /** + * optional int32 unit = 5 [default = 2]; + * + *
+     * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+     * 
+ */ public boolean hasUnit() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional int32 unit = 5 [default = 2]; + * + *
+     * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+     * 
+ */ public int getUnit() { return unit_; } - - // optional bool auto_ack = 6 [default = false]; + public static final int AUTO_ACK_FIELD_NUMBER = 6; private boolean autoAck_; + /** + * optional bool auto_ack = 6 [default = false]; + * + *
+     * 是否自动ack
+     * 
+ */ public boolean hasAutoAck() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional bool auto_ack = 6 [default = false]; + * + *
+     * 是否自动ack
+     * 
+ */ public boolean getAutoAck() { return autoAck_; } - + private void initFields() { destination_ = ""; clientId_ = ""; @@ -4866,12 +6904,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -4895,12 +6934,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -4930,113 +6969,110 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Get parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Get prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Get} + * + *
+     *  PullRequest
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.GetOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Get.class, com.alibaba.otter.canal.protocol.CanalPacket.Get.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Get.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5047,7 +7083,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); destination_ = ""; @@ -5064,20 +7100,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000020); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.Get.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.Get getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.Get.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.Get build() { com.alibaba.otter.canal.protocol.CanalPacket.Get result = buildPartial(); if (!result.isInitialized()) { @@ -5085,17 +7121,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.Get buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.Get result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -5128,7 +7154,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Get) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.Get)other); @@ -5137,14 +7163,18 @@ public final class CanalPacket { return this; } } - + 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.hasDestination()) { - setDestination(other.getDestination()); + bitField0_ |= 0x00000001; + destination_ = other.destination_; + onChanged(); } if (other.hasClientId()) { - setClientId(other.getClientId()); + bitField0_ |= 0x00000002; + clientId_ = other.clientId_; + onChanged(); } if (other.hasFetchSize()) { setFetchSize(other.getFetchSize()); @@ -5161,86 +7191,75 @@ public final class CanalPacket { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - destination_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - clientId_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - fetchSize_ = input.readInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - timeout_ = input.readInt64(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - unit_ = input.readInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - autoAck_ = input.readBool(); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.Get parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Get) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional string destination = 1; + private java.lang.Object destination_ = ""; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - destination_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + destination_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setDestination(String value) { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string destination = 1; + */ + public Builder setDestination( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -5249,34 +7268,74 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string destination = 1; + */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000001); destination_ = getDefaultInstance().getDestination(); onChanged(); return this; } - void setDestination(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string destination = 1; + */ + public Builder setDestinationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; destination_ = value; onChanged(); + return this; } - - // optional string client_id = 2; + private java.lang.Object clientId_ = ""; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - clientId_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + clientId_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setClientId(String value) { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string client_id = 2; + */ + public Builder setClientId( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -5285,191 +7344,404 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string client_id = 2; + */ public Builder clearClientId() { bitField0_ = (bitField0_ & ~0x00000002); clientId_ = getDefaultInstance().getClientId(); onChanged(); return this; } - void setClientId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string client_id = 2; + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; clientId_ = value; onChanged(); + return this; } - - // optional int32 fetch_size = 3; + private int fetchSize_ ; + /** + * optional int32 fetch_size = 3; + */ public boolean hasFetchSize() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int32 fetch_size = 3; + */ public int getFetchSize() { return fetchSize_; } + /** + * optional int32 fetch_size = 3; + */ public Builder setFetchSize(int value) { bitField0_ |= 0x00000004; fetchSize_ = value; onChanged(); return this; } + /** + * optional int32 fetch_size = 3; + */ public Builder clearFetchSize() { bitField0_ = (bitField0_ & ~0x00000004); fetchSize_ = 0; onChanged(); return this; } - - // optional int64 timeout = 4 [default = -1]; + private long timeout_ = -1L; + /** + * optional int64 timeout = 4 [default = -1]; + * + *
+       * 默认-1时代表不控制
+       * 
+ */ public boolean hasTimeout() { return ((bitField0_ & 0x00000008) == 0x00000008); } + /** + * optional int64 timeout = 4 [default = -1]; + * + *
+       * 默认-1时代表不控制
+       * 
+ */ public long getTimeout() { return timeout_; } + /** + * optional int64 timeout = 4 [default = -1]; + * + *
+       * 默认-1时代表不控制
+       * 
+ */ public Builder setTimeout(long value) { bitField0_ |= 0x00000008; timeout_ = value; onChanged(); return this; } + /** + * optional int64 timeout = 4 [default = -1]; + * + *
+       * 默认-1时代表不控制
+       * 
+ */ public Builder clearTimeout() { bitField0_ = (bitField0_ & ~0x00000008); timeout_ = -1L; onChanged(); return this; } - - // optional int32 unit = 5 [default = 2]; + private int unit_ = 2; + /** + * optional int32 unit = 5 [default = 2]; + * + *
+       * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+       * 
+ */ public boolean hasUnit() { return ((bitField0_ & 0x00000010) == 0x00000010); } + /** + * optional int32 unit = 5 [default = 2]; + * + *
+       * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+       * 
+ */ public int getUnit() { return unit_; } + /** + * optional int32 unit = 5 [default = 2]; + * + *
+       * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+       * 
+ */ public Builder setUnit(int value) { bitField0_ |= 0x00000010; unit_ = value; onChanged(); return this; } + /** + * optional int32 unit = 5 [default = 2]; + * + *
+       * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+       * 
+ */ public Builder clearUnit() { bitField0_ = (bitField0_ & ~0x00000010); unit_ = 2; onChanged(); return this; } - - // optional bool auto_ack = 6 [default = false]; + private boolean autoAck_ ; + /** + * optional bool auto_ack = 6 [default = false]; + * + *
+       * 是否自动ack
+       * 
+ */ public boolean hasAutoAck() { return ((bitField0_ & 0x00000020) == 0x00000020); } + /** + * optional bool auto_ack = 6 [default = false]; + * + *
+       * 是否自动ack
+       * 
+ */ public boolean getAutoAck() { return autoAck_; } + /** + * optional bool auto_ack = 6 [default = false]; + * + *
+       * 是否自动ack
+       * 
+ */ public Builder setAutoAck(boolean value) { bitField0_ |= 0x00000020; autoAck_ = value; onChanged(); return this; } + /** + * optional bool auto_ack = 6 [default = false]; + * + *
+       * 是否自动ack
+       * 
+ */ public Builder clearAutoAck() { bitField0_ = (bitField0_ & ~0x00000020); autoAck_ = false; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Get) } - + static { defaultInstance = new Get(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Get) } - - public interface MessagesOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional int64 batch_id = 1; + + public interface MessagesOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Messages) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 batch_id = 1; + */ boolean hasBatchId(); + /** + * optional int64 batch_id = 1; + */ long getBatchId(); - - // repeated bytes messages = 2; + + /** + * repeated bytes messages = 2; + */ java.util.List getMessagesList(); + /** + * repeated bytes messages = 2; + */ int getMessagesCount(); + /** + * repeated bytes messages = 2; + */ com.google.protobuf.ByteString getMessages(int index); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Messages} + * + *
+   * 
+ */ public static final class Messages extends - com.google.protobuf.GeneratedMessage - implements MessagesOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Messages) + MessagesOrBuilder { // Use Messages.newBuilder() to construct. - private Messages(Builder builder) { + private Messages(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Messages(boolean noInit) {} - + private Messages(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final Messages defaultInstance; public static Messages getDefaultInstance() { return defaultInstance; } - + public Messages getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + batchId_ = input.readInt64(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + messages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + messages_.add(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 { + 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; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable; + 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); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Messages parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Messages(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional int64 batch_id = 1; public static final int BATCH_ID_FIELD_NUMBER = 1; private long batchId_; + /** + * optional int64 batch_id = 1; + */ public boolean hasBatchId() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 batch_id = 1; + */ public long getBatchId() { return batchId_; } - - // repeated bytes messages = 2; + public static final int MESSAGES_FIELD_NUMBER = 2; private java.util.List messages_; + /** + * repeated bytes messages = 2; + */ public java.util.List getMessagesList() { return messages_; } + /** + * repeated bytes messages = 2; + */ public int getMessagesCount() { return messages_.size(); } + /** + * repeated bytes messages = 2; + */ public com.google.protobuf.ByteString getMessages(int index) { return messages_.get(index); } - + private void initFields() { batchId_ = 0L; - messages_ = java.util.Collections.emptyList();; + messages_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5481,12 +7753,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5505,113 +7777,109 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Messages prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Messages} + * + *
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.MessagesOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable; + 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); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Messages.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5622,29 +7890,29 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); batchId_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); - messages_ = java.util.Collections.emptyList();; + messages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.Messages.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.Messages getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.Messages.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.Messages build() { com.alibaba.otter.canal.protocol.CanalPacket.Messages result = buildPartial(); if (!result.isInitialized()) { @@ -5652,17 +7920,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.Messages buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.Messages result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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_; @@ -5680,7 +7938,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Messages) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.Messages)other); @@ -5689,7 +7947,7 @@ public final class CanalPacket { return this; } } - + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.Messages other) { if (other == com.alibaba.otter.canal.protocol.CanalPacket.Messages.getDefaultInstance()) return this; if (other.hasBatchId()) { @@ -5708,89 +7966,91 @@ public final class CanalPacket { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - batchId_ = input.readInt64(); - break; - } - case 18: { - ensureMessagesIsMutable(); - messages_.add(input.readBytes()); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.Messages parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Messages) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional int64 batch_id = 1; + private long batchId_ ; + /** + * optional int64 batch_id = 1; + */ public boolean hasBatchId() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** + * optional int64 batch_id = 1; + */ public long getBatchId() { return batchId_; } + /** + * optional int64 batch_id = 1; + */ public Builder setBatchId(long value) { bitField0_ |= 0x00000001; batchId_ = value; onChanged(); return this; } + /** + * optional int64 batch_id = 1; + */ public Builder clearBatchId() { bitField0_ = (bitField0_ & ~0x00000001); batchId_ = 0L; onChanged(); return this; } - - // repeated bytes messages = 2; - private java.util.List messages_ = java.util.Collections.emptyList();; + + private java.util.List messages_ = java.util.Collections.emptyList(); private void ensureMessagesIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { messages_ = new java.util.ArrayList(messages_); bitField0_ |= 0x00000002; } } + /** + * repeated bytes messages = 2; + */ public java.util.List getMessagesList() { return java.util.Collections.unmodifiableList(messages_); } + /** + * repeated bytes messages = 2; + */ public int getMessagesCount() { return messages_.size(); } + /** + * repeated bytes messages = 2; + */ public com.google.protobuf.ByteString getMessages(int index) { return messages_.get(index); } + /** + * repeated bytes messages = 2; + */ public Builder setMessages( int index, com.google.protobuf.ByteString value) { if (value == null) { @@ -5801,6 +8061,9 @@ public final class CanalPacket { onChanged(); return this; } + /** + * repeated bytes messages = 2; + */ public Builder addMessages(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -5810,127 +8073,258 @@ public final class CanalPacket { onChanged(); return this; } + /** + * repeated bytes messages = 2; + */ public Builder addAllMessages( java.lang.Iterable values) { ensureMessagesIsMutable(); - super.addAll(values, messages_); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, messages_); onChanged(); return this; } + /** + * repeated bytes messages = 2; + */ public Builder clearMessages() { - messages_ = java.util.Collections.emptyList();; + messages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Messages) } - + static { defaultInstance = new Messages(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Messages) } - - public interface DumpOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string journal = 1; + + public interface DumpOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Dump) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string journal = 1; + */ boolean hasJournal(); - String getJournal(); - - // optional int64 position = 2; + /** + * optional string journal = 1; + */ + java.lang.String getJournal(); + /** + * optional string journal = 1; + */ + com.google.protobuf.ByteString + getJournalBytes(); + + /** + * optional int64 position = 2; + */ boolean hasPosition(); + /** + * optional int64 position = 2; + */ long getPosition(); - - // optional int64 timestamp = 3 [default = 0]; + + /** + * optional int64 timestamp = 3 [default = 0]; + */ boolean hasTimestamp(); + /** + * optional int64 timestamp = 3 [default = 0]; + */ long getTimestamp(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Dump} + * + *
+   * TBD when new packets are required
+   * 
+ */ public static final class Dump extends - com.google.protobuf.GeneratedMessage - implements DumpOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Dump) + DumpOrBuilder { // Use Dump.newBuilder() to construct. - private Dump(Builder builder) { + private Dump(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private Dump(boolean noInit) {} - + private Dump(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final Dump defaultInstance; public static Dump getDefaultInstance() { return defaultInstance; } - + public Dump getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + journal_ = bs; + break; + } + case 16: { + bitField0_ |= 0x00000002; + position_ = input.readInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + timestamp_ = 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 { + 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; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Dump.class, com.alibaba.otter.canal.protocol.CanalPacket.Dump.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Dump parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Dump(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional string journal = 1; public static final int JOURNAL_FIELD_NUMBER = 1; private java.lang.Object journal_; + /** + * optional string journal = 1; + */ public boolean hasJournal() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getJournal() { + /** + * optional string journal = 1; + */ + public java.lang.String getJournal() { java.lang.Object ref = journal_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { journal_ = s; } return s; } } - private com.google.protobuf.ByteString getJournalBytes() { + /** + * optional string journal = 1; + */ + public com.google.protobuf.ByteString + getJournalBytes() { java.lang.Object ref = journal_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); journal_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional int64 position = 2; + public static final int POSITION_FIELD_NUMBER = 2; private long position_; + /** + * optional int64 position = 2; + */ public boolean hasPosition() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional int64 position = 2; + */ public long getPosition() { return position_; } - - // optional int64 timestamp = 3 [default = 0]; + public static final int TIMESTAMP_FIELD_NUMBER = 3; private long timestamp_; + /** + * optional int64 timestamp = 3 [default = 0]; + */ public boolean hasTimestamp() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int64 timestamp = 3 [default = 0]; + */ public long getTimestamp() { return timestamp_; } - + private void initFields() { journal_ = ""; position_ = 0L; @@ -5939,12 +8333,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -5959,12 +8354,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -5982,113 +8377,110 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Dump prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Dump} + * + *
+     * TBD when new packets are required
+     * 
+ */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.DumpOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.Dump.class, com.alibaba.otter.canal.protocol.CanalPacket.Dump.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Dump.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6099,7 +8491,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); journal_ = ""; @@ -6110,20 +8502,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.Dump.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.Dump getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.Dump.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.Dump build() { com.alibaba.otter.canal.protocol.CanalPacket.Dump result = buildPartial(); if (!result.isInitialized()) { @@ -6131,17 +8523,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.Dump buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.Dump result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -6162,7 +8544,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.Dump) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.Dump)other); @@ -6171,11 +8553,13 @@ public final class CanalPacket { return this; } } - + 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.hasJournal()) { - setJournal(other.getJournal()); + bitField0_ |= 0x00000001; + journal_ = other.journal_; + onChanged(); } if (other.hasPosition()) { setPosition(other.getPosition()); @@ -6186,71 +8570,75 @@ public final class CanalPacket { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - journal_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - position_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - timestamp_ = input.readInt64(); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.Dump parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.Dump) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional string journal = 1; + private java.lang.Object journal_ = ""; + /** + * optional string journal = 1; + */ public boolean hasJournal() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getJournal() { + /** + * optional string journal = 1; + */ + public java.lang.String getJournal() { java.lang.Object ref = journal_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - journal_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + journal_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setJournal(String value) { + /** + * optional string journal = 1; + */ + public com.google.protobuf.ByteString + getJournalBytes() { + java.lang.Object ref = journal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + journal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string journal = 1; + */ + public Builder setJournal( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -6259,189 +8647,353 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string journal = 1; + */ public Builder clearJournal() { bitField0_ = (bitField0_ & ~0x00000001); journal_ = getDefaultInstance().getJournal(); onChanged(); return this; } - void setJournal(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string journal = 1; + */ + public Builder setJournalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; journal_ = value; onChanged(); + return this; } - - // optional int64 position = 2; + private long position_ ; + /** + * optional int64 position = 2; + */ public boolean hasPosition() { return ((bitField0_ & 0x00000002) == 0x00000002); } + /** + * optional int64 position = 2; + */ public long getPosition() { return position_; } + /** + * optional int64 position = 2; + */ public Builder setPosition(long value) { bitField0_ |= 0x00000002; position_ = value; onChanged(); return this; } + /** + * optional int64 position = 2; + */ public Builder clearPosition() { bitField0_ = (bitField0_ & ~0x00000002); position_ = 0L; onChanged(); return this; } - - // optional int64 timestamp = 3 [default = 0]; + private long timestamp_ ; + /** + * optional int64 timestamp = 3 [default = 0]; + */ public boolean hasTimestamp() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int64 timestamp = 3 [default = 0]; + */ public long getTimestamp() { return timestamp_; } + /** + * optional int64 timestamp = 3 [default = 0]; + */ public Builder setTimestamp(long value) { bitField0_ |= 0x00000004; timestamp_ = value; onChanged(); return this; } + /** + * optional int64 timestamp = 3 [default = 0]; + */ public Builder clearTimestamp() { bitField0_ = (bitField0_ & ~0x00000004); timestamp_ = 0L; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Dump) } - + static { defaultInstance = new Dump(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Dump) } - - public interface ClientRollbackOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string destination = 1; + + public interface ClientRollbackOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.ClientRollback) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string destination = 1; + */ boolean hasDestination(); - String getDestination(); - - // optional string client_id = 2; + /** + * optional string destination = 1; + */ + java.lang.String getDestination(); + /** + * optional string destination = 1; + */ + com.google.protobuf.ByteString + getDestinationBytes(); + + /** + * optional string client_id = 2; + */ boolean hasClientId(); - String getClientId(); - - // optional int64 batch_id = 3; + /** + * optional string client_id = 2; + */ + java.lang.String getClientId(); + /** + * optional string client_id = 2; + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + * optional int64 batch_id = 3; + */ boolean hasBatchId(); + /** + * optional int64 batch_id = 3; + */ long getBatchId(); } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientRollback} + */ public static final class ClientRollback extends - com.google.protobuf.GeneratedMessage - implements ClientRollbackOrBuilder { + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ClientRollback) + ClientRollbackOrBuilder { // Use ClientRollback.newBuilder() to construct. - private ClientRollback(Builder builder) { + private ClientRollback(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); + this.unknownFields = builder.getUnknownFields(); } - private ClientRollback(boolean noInit) {} - + private ClientRollback(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private static final ClientRollback defaultInstance; public static ClientRollback getDefaultInstance() { return defaultInstance; } - + public ClientRollback getDefaultInstanceForType() { return defaultInstance; } - + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @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 { + 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; + destination_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + clientId_ = bs; + break; + } + case 24: { + bitField0_ |= 0x00000004; + batchId_ = 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 { + 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; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.class, com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.Builder.class); } - + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ClientRollback parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ClientRollback(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + private int bitField0_; - // optional string destination = 1; public static final int DESTINATION_FIELD_NUMBER = 1; private java.lang.Object destination_; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { destination_ = s; } return s; } } - private com.google.protobuf.ByteString getDestinationBytes() { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { java.lang.Object ref = destination_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); destination_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional string client_id = 2; + public static final int CLIENT_ID_FIELD_NUMBER = 2; private java.lang.Object clientId_; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (ref instanceof String) { - return (String) ref; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { clientId_ = s; } return s; } } - private com.google.protobuf.ByteString getClientIdBytes() { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { java.lang.Object ref = clientId_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); clientId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - - // optional int64 batch_id = 3; + public static final int BATCH_ID_FIELD_NUMBER = 3; private long batchId_; + /** + * optional int64 batch_id = 3; + */ public boolean hasBatchId() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int64 batch_id = 3; + */ public long getBatchId() { return batchId_; } - + private void initFields() { destination_ = ""; clientId_ = ""; @@ -6450,12 +9002,13 @@ public final class CanalPacket { private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } - + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); @@ -6470,12 +9023,12 @@ public final class CanalPacket { } getUnknownFields().writeTo(output); } - + private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; - + size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream @@ -6493,113 +9046,106 @@ public final class CanalPacket { memoizedSerializedSize = size; return size; } - + private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } - + public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + return PARSER.parseFrom(data); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(java.io.InputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + return PARSER.parseFrom(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 newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return PARSER.parseFrom(input, extensionRegistry); } - + public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } - + @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientRollback} + */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alibaba.otter.canal.protocol.CanalPacket.ClientRollbackOrBuilder { + 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 getDescriptor() { return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor; } - + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable; + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.class, com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.Builder.class); } - + // Construct using com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - - private Builder(BuilderParent parent) { + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6610,7 +9156,7 @@ public final class CanalPacket { private static Builder create() { return new Builder(); } - + public Builder clear() { super.clear(); destination_ = ""; @@ -6621,20 +9167,20 @@ public final class CanalPacket { bitField0_ = (bitField0_ & ~0x00000004); return this; } - + public Builder clone() { return create().mergeFrom(buildPartial()); } - + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.getDescriptor(); + return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor; } - + public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback getDefaultInstanceForType() { return com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.getDefaultInstance(); } - + public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback build() { com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback result = buildPartial(); if (!result.isInitialized()) { @@ -6642,17 +9188,7 @@ public final class CanalPacket { } return result; } - - private com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - + 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); int from_bitField0_ = bitField0_; @@ -6673,7 +9209,7 @@ public final class CanalPacket { onBuilt(); return result; } - + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback) { return mergeFrom((com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback)other); @@ -6682,14 +9218,18 @@ public final class CanalPacket { return this; } } - + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback other) { if (other == com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.getDefaultInstance()) return this; if (other.hasDestination()) { - setDestination(other.getDestination()); + bitField0_ |= 0x00000001; + destination_ = other.destination_; + onChanged(); } if (other.hasClientId()) { - setClientId(other.getClientId()); + bitField0_ |= 0x00000002; + clientId_ = other.clientId_; + onChanged(); } if (other.hasBatchId()) { setBatchId(other.getBatchId()); @@ -6697,71 +9237,75 @@ public final class CanalPacket { this.mergeUnknownFields(other.getUnknownFields()); return this; } - + public final boolean isInitialized() { return true; } - + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - destination_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - clientId_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - batchId_ = input.readInt64(); - break; - } + com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } } + return this; } - private int bitField0_; - - // optional string destination = 1; + private java.lang.Object destination_ = ""; + /** + * optional string destination = 1; + */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getDestination() { + /** + * optional string destination = 1; + */ + public java.lang.String getDestination() { java.lang.Object ref = destination_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - destination_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + destination_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setDestination(String value) { + /** + * optional string destination = 1; + */ + public com.google.protobuf.ByteString + getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string destination = 1; + */ + public Builder setDestination( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -6770,34 +9314,74 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string destination = 1; + */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000001); destination_ = getDefaultInstance().getDestination(); onChanged(); return this; } - void setDestination(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; + /** + * optional string destination = 1; + */ + public Builder setDestinationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; destination_ = value; onChanged(); + return this; } - - // optional string client_id = 2; + private java.lang.Object clientId_ = ""; + /** + * optional string client_id = 2; + */ public boolean hasClientId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getClientId() { + /** + * optional string client_id = 2; + */ + public java.lang.String getClientId() { java.lang.Object ref = clientId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - clientId_ = s; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + clientId_ = s; + } return s; } else { - return (String) ref; + return (java.lang.String) ref; } } - public Builder setClientId(String value) { + /** + * optional string client_id = 2; + */ + public com.google.protobuf.ByteString + getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string client_id = 2; + */ + public Builder setClientId( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -6806,111 +9390,133 @@ public final class CanalPacket { onChanged(); return this; } + /** + * optional string client_id = 2; + */ public Builder clearClientId() { bitField0_ = (bitField0_ & ~0x00000002); clientId_ = getDefaultInstance().getClientId(); onChanged(); return this; } - void setClientId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; + /** + * optional string client_id = 2; + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; clientId_ = value; onChanged(); + return this; } - - // optional int64 batch_id = 3; + private long batchId_ ; + /** + * optional int64 batch_id = 3; + */ public boolean hasBatchId() { return ((bitField0_ & 0x00000004) == 0x00000004); } + /** + * optional int64 batch_id = 3; + */ public long getBatchId() { return batchId_; } + /** + * optional int64 batch_id = 3; + */ public Builder setBatchId(long value) { bitField0_ |= 0x00000004; batchId_ = value; onChanged(); return this; } + /** + * optional int64 batch_id = 3; + */ public Builder clearBatchId() { bitField0_ = (bitField0_ & ~0x00000004); batchId_ = 0L; onChanged(); return this; } - + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.ClientRollback) } - + static { defaultInstance = new ClientRollback(true); defaultInstance.initFields(); } - + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.ClientRollback) } - - private static com.google.protobuf.Descriptors.Descriptor + + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Get_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable; - + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -6960,114 +9566,90 @@ public final class CanalPacket { "lB\013CanalPacketH\001" }; 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; - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor, - new java.lang.String[] { "MagicNumber", "Version", "Type", "Compression", "Body", }, - com.alibaba.otter.canal.protocol.CanalPacket.Packet.class, - com.alibaba.otter.canal.protocol.CanalPacket.Packet.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor, - new java.lang.String[] { "SendTimestamp", "StartTimestamp", }, - com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.class, - com.alibaba.otter.canal.protocol.CanalPacket.HeartBeat.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor, - new java.lang.String[] { "CommunicationEncoding", "Seeds", "SupportedCompressions", }, - com.alibaba.otter.canal.protocol.CanalPacket.Handshake.class, - com.alibaba.otter.canal.protocol.CanalPacket.Handshake.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor, - new java.lang.String[] { "Username", "Password", "NetReadTimeout", "NetWriteTimeout", "Destination", "ClientId", "Filter", "StartTimestamp", }, - com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.class, - com.alibaba.otter.canal.protocol.CanalPacket.ClientAuth.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor, - new java.lang.String[] { "ErrorCode", "ErrorMessage", }, - com.alibaba.otter.canal.protocol.CanalPacket.Ack.class, - com.alibaba.otter.canal.protocol.CanalPacket.Ack.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor, - new java.lang.String[] { "Destination", "ClientId", "BatchId", }, - com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.class, - com.alibaba.otter.canal.protocol.CanalPacket.ClientAck.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor, - new java.lang.String[] { "Destination", "ClientId", "Filter", }, - com.alibaba.otter.canal.protocol.CanalPacket.Sub.class, - com.alibaba.otter.canal.protocol.CanalPacket.Sub.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor, - new java.lang.String[] { "Destination", "ClientId", "Filter", }, - com.alibaba.otter.canal.protocol.CanalPacket.Unsub.class, - com.alibaba.otter.canal.protocol.CanalPacket.Unsub.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_Get_descriptor, - new java.lang.String[] { "Destination", "ClientId", "FetchSize", "Timeout", "Unit", "AutoAck", }, - com.alibaba.otter.canal.protocol.CanalPacket.Get.class, - com.alibaba.otter.canal.protocol.CanalPacket.Get.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor, - new java.lang.String[] { "BatchId", "Messages", }, - com.alibaba.otter.canal.protocol.CanalPacket.Messages.class, - com.alibaba.otter.canal.protocol.CanalPacket.Messages.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor, - new java.lang.String[] { "Journal", "Position", "Timestamp", }, - com.alibaba.otter.canal.protocol.CanalPacket.Dump.class, - com.alibaba.otter.canal.protocol.CanalPacket.Dump.Builder.class); - 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.GeneratedMessage.FieldAccessorTable( - internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor, - new java.lang.String[] { "Destination", "ClientId", "BatchId", }, - com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.class, - com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.Builder.class); - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); + internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor, + new java.lang.String[] { "MagicNumber", "Version", "Type", "Compression", "Body", }); + 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.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.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor, + new java.lang.String[] { "CommunicationEncoding", "Seeds", "SupportedCompressions", }); + 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.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor, + new java.lang.String[] { "Username", "Password", "NetReadTimeout", "NetWriteTimeout", "Destination", "ClientId", "Filter", "StartTimestamp", }); + 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.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor, + new java.lang.String[] { "ErrorCode", "ErrorMessage", }); + 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.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.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.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.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_Get_descriptor, + new java.lang.String[] { "Destination", "ClientId", "FetchSize", "Timeout", "Unit", "AutoAck", }); + 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.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.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor, + new java.lang.String[] { "Journal", "Position", "Timestamp", }); + 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.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor, + new java.lang.String[] { "Destination", "ClientId", "BatchId", }); } - + // @@protoc_insertion_point(outer_class_scope) }