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;
+ }
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_descriptor;
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ 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);
+ }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
- 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();
+ }
- // Construct using
- // com.alibaba.otter.canal.protocol.CanalPacket.Get.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();
- destination_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- clientId_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- fetchSize_ = 0;
- bitField0_ = (bitField0_ & ~0x00000004);
- timeout_ = -1L;
- bitField0_ = (bitField0_ & ~0x00000008);
- unit_ = 2;
- bitField0_ = (bitField0_ & ~0x00000010);
- autoAck_ = false;
- 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.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()) {
- throw newUninitializedMessageException(result);
- }
- 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_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.destination_ = destination_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.clientId_ = clientId_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.fetchSize_ = fetchSize_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000008;
- }
- result.timeout_ = timeout_;
- if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
- to_bitField0_ |= 0x00000010;
- }
- result.unit_ = unit_;
- if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
- to_bitField0_ |= 0x00000020;
- }
- result.autoAck_ = autoAck_;
- result.bitField0_ = to_bitField0_;
- 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);
- } else {
- super.mergeFrom(other);
- 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()) {
- bitField0_ |= 0x00000001;
- destination_ = other.destination_;
- onChanged();
- }
- if (other.hasClientId()) {
- bitField0_ |= 0x00000002;
- clientId_ = other.clientId_;
- onChanged();
- }
- if (other.hasFetchSize()) {
- setFetchSize(other.getFetchSize());
- }
- if (other.hasTimeout()) {
- setTimeout(other.getTimeout());
- }
- if (other.hasUnit()) {
- setUnit(other.getUnit());
- }
- if (other.hasAutoAck()) {
- setAutoAck(other.getAutoAck());
- }
- 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.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_;
-
- private java.lang.Object destination_ = "";
-
- /**
- * optional string destination = 1;
- */
- public boolean hasDestination() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
-
- /**
- * optional string destination = 1;
- */
- public java.lang.String getDestination() {
- java.lang.Object ref = destination_;
- 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 (java.lang.String) ref;
- }
- }
-
- /**
- * 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();
- }
- bitField0_ |= 0x00000001;
- destination_ = value;
- onChanged();
- return this;
- }
-
- /**
- * optional string destination = 1;
- */
- public Builder clearDestination() {
- bitField0_ = (bitField0_ & ~0x00000001);
- destination_ = getDefaultInstance().getDestination();
- onChanged();
- return this;
- }
-
- /**
- * 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;
- }
-
- private java.lang.Object clientId_ = "";
-
- /**
- * optional string client_id = 2;
- */
- public boolean hasClientId() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
-
- /**
- * optional string client_id = 2;
- */
- public java.lang.String getClientId() {
- java.lang.Object ref = clientId_;
- 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 (java.lang.String) ref;
- }
- }
-
- /**
- * 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();
- }
- bitField0_ |= 0x00000002;
- clientId_ = value;
- onChanged();
- return this;
- }
-
- /**
- * optional string client_id = 2;
- */
- public Builder clearClientId() {
- bitField0_ = (bitField0_ & ~0x00000002);
- clientId_ = getDefaultInstance().getClientId();
- onChanged();
- return this;
- }
-
- /**
- * 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;
- }
-
- 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;
- }
-
- 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;
- }
-
- 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;
- }
-
- 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)
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
}
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ destination_ = "";
- static {
- defaultInstance = new Get(true);
- defaultInstance.initFields();
+ clientId_ = "";
+
+ fetchSize_ = 0;
+
+ timeoutPresentCase_ = 0;
+ timeoutPresent_ = null;
+ unitPresentCase_ = 0;
+ unitPresent_ = null;
+ autoAckPresentCase_ = 0;
+ autoAckPresent_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Get_descriptor;
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Get getDefaultInstanceForType() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.Get.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Get build() {
+ com.alibaba.otter.canal.protocol.CanalPacket.Get result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
}
+ return result;
+ }
- // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Get)
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Get buildPartial() {
+ com.alibaba.otter.canal.protocol.CanalPacket.Get result = new com.alibaba.otter.canal.protocol.CanalPacket.Get(this);
+ result.destination_ = destination_;
+ result.clientId_ = clientId_;
+ result.fetchSize_ = fetchSize_;
+ if (timeoutPresentCase_ == 4) {
+ result.timeoutPresent_ = timeoutPresent_;
+ }
+ if (unitPresentCase_ == 5) {
+ result.unitPresent_ = unitPresent_;
+ }
+ if (autoAckPresentCase_ == 6) {
+ result.autoAckPresent_ = autoAckPresent_;
+ }
+ result.timeoutPresentCase_ = timeoutPresentCase_;
+ result.unitPresentCase_ = unitPresentCase_;
+ result.autoAckPresentCase_ = autoAckPresentCase_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ 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);
+ } else {
+ super.mergeFrom(other);
+ 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.getDestination().isEmpty()) {
+ destination_ = other.destination_;
+ onChanged();
+ }
+ if (!other.getClientId().isEmpty()) {
+ clientId_ = other.clientId_;
+ onChanged();
+ }
+ if (other.getFetchSize() != 0) {
+ setFetchSize(other.getFetchSize());
+ }
+ switch (other.getTimeoutPresentCase()) {
+ case TIMEOUT: {
+ setTimeout(other.getTimeout());
+ break;
+ }
+ case TIMEOUTPRESENT_NOT_SET: {
+ break;
+ }
+ }
+ switch (other.getUnitPresentCase()) {
+ case UNIT: {
+ setUnit(other.getUnit());
+ break;
+ }
+ case UNITPRESENT_NOT_SET: {
+ break;
+ }
+ }
+ switch (other.getAutoAckPresentCase()) {
+ case AUTO_ACK: {
+ setAutoAck(other.getAutoAck());
+ break;
+ }
+ case AUTOACKPRESENT_NOT_SET: {
+ break;
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ 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.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int timeoutPresentCase_ = 0;
+ private java.lang.Object timeoutPresent_;
+ public TimeoutPresentCase
+ getTimeoutPresentCase() {
+ return TimeoutPresentCase.forNumber(
+ timeoutPresentCase_);
+ }
+
+ public Builder clearTimeoutPresent() {
+ timeoutPresentCase_ = 0;
+ timeoutPresent_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int unitPresentCase_ = 0;
+ private java.lang.Object unitPresent_;
+ public UnitPresentCase
+ getUnitPresentCase() {
+ return UnitPresentCase.forNumber(
+ unitPresentCase_);
+ }
+
+ public Builder clearUnitPresent() {
+ unitPresentCase_ = 0;
+ unitPresent_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int autoAckPresentCase_ = 0;
+ private java.lang.Object autoAckPresent_;
+ public AutoAckPresentCase
+ getAutoAckPresentCase() {
+ return AutoAckPresentCase.forNumber(
+ autoAckPresentCase_);
+ }
+
+ public Builder clearAutoAckPresent() {
+ autoAckPresentCase_ = 0;
+ autoAckPresent_ = null;
+ onChanged();
+ return this;
+ }
+
+
+ private java.lang.Object destination_ = "";
+ /**
+ * string destination = 1;
+ */
+ public java.lang.String getDestination() {
+ java.lang.Object ref = destination_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ destination_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * 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;
+ }
+ }
+ /**
+ * string destination = 1;
+ */
+ public Builder setDestination(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ destination_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string destination = 1;
+ */
+ public Builder clearDestination() {
+
+ destination_ = getDefaultInstance().getDestination();
+ onChanged();
+ return this;
+ }
+ /**
+ * string destination = 1;
+ */
+ public Builder setDestinationBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ destination_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object clientId_ = "";
+ /**
+ * string client_id = 2;
+ */
+ public java.lang.String getClientId() {
+ java.lang.Object ref = clientId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ clientId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * 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;
+ }
+ }
+ /**
+ * string client_id = 2;
+ */
+ public Builder setClientId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ clientId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string client_id = 2;
+ */
+ public Builder clearClientId() {
+
+ clientId_ = getDefaultInstance().getClientId();
+ onChanged();
+ return this;
+ }
+ /**
+ * string client_id = 2;
+ */
+ public Builder setClientIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ clientId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int fetchSize_ ;
+ /**
+ * int32 fetch_size = 3;
+ */
+ public int getFetchSize() {
+ return fetchSize_;
+ }
+ /**
+ * int32 fetch_size = 3;
+ */
+ public Builder setFetchSize(int value) {
+
+ fetchSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 fetch_size = 3;
+ */
+ public Builder clearFetchSize() {
+
+ fetchSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ * 默认-1时代表不控制
+ *
+ *
+ * int64 timeout = 4;
+ */
+ public long getTimeout() {
+ if (timeoutPresentCase_ == 4) {
+ return (java.lang.Long) timeoutPresent_;
+ }
+ return 0L;
+ }
+ /**
+ *
+ * 默认-1时代表不控制
+ *
+ *
+ * int64 timeout = 4;
+ */
+ public Builder setTimeout(long value) {
+ timeoutPresentCase_ = 4;
+ timeoutPresent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 默认-1时代表不控制
+ *
+ *
+ * int64 timeout = 4;
+ */
+ public Builder clearTimeout() {
+ if (timeoutPresentCase_ == 4) {
+ timeoutPresentCase_ = 0;
+ timeoutPresent_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+ *
+ *
+ * int32 unit = 5;
+ */
+ public int getUnit() {
+ if (unitPresentCase_ == 5) {
+ return (java.lang.Integer) unitPresent_;
+ }
+ return 0;
+ }
+ /**
+ *
+ * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+ *
+ *
+ * int32 unit = 5;
+ */
+ public Builder setUnit(int value) {
+ unitPresentCase_ = 5;
+ unitPresent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+ *
+ *
+ * int32 unit = 5;
+ */
+ public Builder clearUnit() {
+ if (unitPresentCase_ == 5) {
+ unitPresentCase_ = 0;
+ unitPresent_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ * 是否自动ack
+ *
+ *
+ * bool auto_ack = 6;
+ */
+ public boolean getAutoAck() {
+ if (autoAckPresentCase_ == 6) {
+ return (java.lang.Boolean) autoAckPresent_;
+ }
+ return false;
+ }
+ /**
+ *
+ * 是否自动ack
+ *
+ *
+ * bool auto_ack = 6;
+ */
+ public Builder setAutoAck(boolean value) {
+ autoAckPresentCase_ = 6;
+ autoAckPresent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 是否自动ack
+ *
+ *
+ * bool auto_ack = 6;
+ */
+ public Builder clearAutoAck() {
+ if (autoAckPresentCase_ == 6) {
+ autoAckPresentCase_ = 0;
+ autoAckPresent_ = null;
+ onChanged();
+ }
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Get)
}
- 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;
- */
- java.util.List getMessagesList();
-
- /**
- * repeated bytes messages = 2;
- */
- int getMessagesCount();
-
- /**
- * repeated bytes messages = 2;
- */
- com.google.protobuf.ByteString getMessages(int index);
+ // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Get)
+ private static final com.alibaba.otter.canal.protocol.CanalPacket.Get DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalPacket.Get();
}
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Get getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public Get parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Get(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Get getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface MessagesOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Messages)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int64 batch_id = 1;
+ */
+ long getBatchId();
+
+ /**
+ * 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.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Messages)
+ MessagesOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Messages.newBuilder() to construct.
+ private Messages(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Messages() {
+ batchId_ = 0L;
+ messages_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Messages(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8: {
+
+ batchId_ = input.readInt64();
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ messages_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ messages_.add(input.readBytes());
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ messages_ = java.util.Collections.unmodifiableList(messages_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.alibaba.otter.canal.protocol.CanalPacket.Messages.class, com.alibaba.otter.canal.protocol.CanalPacket.Messages.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int BATCH_ID_FIELD_NUMBER = 1;
+ private long batchId_;
+ /**
+ * int64 batch_id = 1;
+ */
+ public long getBatchId() {
+ return batchId_;
+ }
+
+ 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 byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (batchId_ != 0L) {
+ output.writeInt64(1, batchId_);
+ }
+ for (int i = 0; i < messages_.size(); i++) {
+ output.writeBytes(2, messages_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (batchId_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(1, batchId_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < messages_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream
+ .computeBytesSizeNoTag(messages_.get(i));
+ }
+ size += dataSize;
+ size += 1 * getMessagesList().size();
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalPacket.Messages)) {
+ return super.equals(obj);
+ }
+ com.alibaba.otter.canal.protocol.CanalPacket.Messages other = (com.alibaba.otter.canal.protocol.CanalPacket.Messages) obj;
+
+ boolean result = true;
+ result = result && (getBatchId()
+ == other.getBatchId());
+ result = result && getMessagesList()
+ .equals(other.getMessagesList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + BATCH_ID_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getBatchId());
+ if (getMessagesCount() > 0) {
+ hash = (37 * hash) + MESSAGES_FIELD_NUMBER;
+ hash = (53 * hash) + getMessagesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ 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 PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ 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 PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Messages prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
/**
- * Protobuf type {@code com.alibaba.otter.canal.protocol.Messages}
- *
*
*
+ *
+ * Protobuf type {@code com.alibaba.otter.canal.protocol.Messages}
*/
- public static final class Messages extends com.google.protobuf.GeneratedMessage implements
- // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Messages)
- MessagesOrBuilder {
-
- // Use Messages.newBuilder() to construct.
- private Messages(com.google.protobuf.GeneratedMessage.Builder> builder){
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
-
- 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.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_;
- 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_;
- }
-
- 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();
- }
-
- 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.writeInt64(1, batchId_);
- }
- for (int i = 0; i < messages_.size(); i++) {
- output.writeBytes(2, messages_.get(i));
- }
- 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.computeInt64Size(1, batchId_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < messages_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream.computeBytesSizeNoTag(messages_.get(i));
- }
- size += dataSize;
- size += 1 * getMessagesList().size();
- }
- 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.Messages parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- 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 PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- 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 PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- 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 PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static com.alibaba.otter.canal.protocol.CanalPacket.Messages parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- 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 {
- 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 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 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
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.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;
+ }
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor;
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.alibaba.otter.canal.protocol.CanalPacket.Messages.class, com.alibaba.otter.canal.protocol.CanalPacket.Messages.Builder.class);
+ }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
- return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalPacket.Messages.class,
- com.alibaba.otter.canal.protocol.CanalPacket.Messages.Builder.class);
- }
+ // Construct using com.alibaba.otter.canal.protocol.CanalPacket.Messages.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
- // Construct using
- // com.alibaba.otter.canal.protocol.CanalPacket.Messages.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();
- batchId_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- 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.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()) {
- throw newUninitializedMessageException(result);
- }
- 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_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.batchId_ = batchId_;
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- messages_ = java.util.Collections.unmodifiableList(messages_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.messages_ = messages_;
- result.bitField0_ = to_bitField0_;
- 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);
- } else {
- super.mergeFrom(other);
- 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()) {
- setBatchId(other.getBatchId());
- }
- if (!other.messages_.isEmpty()) {
- if (messages_.isEmpty()) {
- messages_ = other.messages_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureMessagesIsMutable();
- messages_.addAll(other.messages_);
- }
- 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.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_;
-
- 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;
- }
-
- 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) {
- throw new NullPointerException();
- }
- ensureMessagesIsMutable();
- messages_.set(index, value);
- onChanged();
- return this;
- }
-
- /**
- * repeated bytes messages = 2;
- */
- public Builder addMessages(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureMessagesIsMutable();
- messages_.add(value);
- onChanged();
- return this;
- }
-
- /**
- * repeated bytes messages = 2;
- */
- public Builder addAllMessages(java.lang.Iterable extends com.google.protobuf.ByteString> values) {
- ensureMessagesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messages_);
- onChanged();
- return this;
- }
-
- /**
- * repeated bytes messages = 2;
- */
- public Builder clearMessages() {
- messages_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Messages)
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
}
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ batchId_ = 0L;
- static {
- defaultInstance = new Messages(true);
- defaultInstance.initFields();
+ messages_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor;
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Messages getDefaultInstanceForType() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.Messages.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Messages build() {
+ com.alibaba.otter.canal.protocol.CanalPacket.Messages result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
}
+ return result;
+ }
- // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Messages)
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Messages buildPartial() {
+ com.alibaba.otter.canal.protocol.CanalPacket.Messages result = new com.alibaba.otter.canal.protocol.CanalPacket.Messages(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ result.batchId_ = batchId_;
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ messages_ = java.util.Collections.unmodifiableList(messages_);
+ bitField0_ = (bitField0_ & ~0x00000002);
+ }
+ result.messages_ = messages_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ 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);
+ } else {
+ super.mergeFrom(other);
+ 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.getBatchId() != 0L) {
+ setBatchId(other.getBatchId());
+ }
+ if (!other.messages_.isEmpty()) {
+ if (messages_.isEmpty()) {
+ messages_ = other.messages_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ ensureMessagesIsMutable();
+ messages_.addAll(other.messages_);
+ }
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ 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.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private long batchId_ ;
+ /**
+ * int64 batch_id = 1;
+ */
+ public long getBatchId() {
+ return batchId_;
+ }
+ /**
+ * int64 batch_id = 1;
+ */
+ public Builder setBatchId(long value) {
+
+ batchId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 batch_id = 1;
+ */
+ public Builder clearBatchId() {
+
+ batchId_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ 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) {
+ throw new NullPointerException();
+ }
+ ensureMessagesIsMutable();
+ messages_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated bytes messages = 2;
+ */
+ public Builder addMessages(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMessagesIsMutable();
+ messages_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated bytes messages = 2;
+ */
+ public Builder addAllMessages(
+ java.lang.Iterable extends com.google.protobuf.ByteString> values) {
+ ensureMessagesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, messages_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated bytes messages = 2;
+ */
+ public Builder clearMessages() {
+ messages_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Messages)
}
- 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();
-
- /**
- * 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];
- */
- boolean hasTimestamp();
-
- /**
- * optional int64 timestamp = 3 [default = 0];
- */
- long getTimestamp();
+ // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Messages)
+ private static final com.alibaba.otter.canal.protocol.CanalPacket.Messages DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalPacket.Messages();
}
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Messages getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public Messages parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Messages(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Messages getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface DumpOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Dump)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * string journal = 1;
+ */
+ java.lang.String getJournal();
+ /**
+ * string journal = 1;
+ */
+ com.google.protobuf.ByteString
+ getJournalBytes();
+
+ /**
+ * int64 position = 2;
+ */
+ long getPosition();
+
+ /**
+ * int64 timestamp = 3;
+ */
+ long getTimestamp();
+
+ public com.alibaba.otter.canal.protocol.CanalPacket.Dump.TimestampPresentCase getTimestampPresentCase();
+ }
+ /**
+ *
+ * TBD when new packets are required
+ *
+ *
+ * Protobuf type {@code com.alibaba.otter.canal.protocol.Dump}
+ */
+ public static final class Dump extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Dump)
+ DumpOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Dump.newBuilder() to construct.
+ private Dump(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Dump() {
+ journal_ = "";
+ position_ = 0L;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Dump(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ journal_ = s;
+ break;
+ }
+ case 16: {
+
+ position_ = input.readInt64();
+ break;
+ }
+ case 24: {
+ timestampPresentCase_ = 3;
+ timestampPresent_ = input.readInt64();
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ 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);
+ }
+
+ private int timestampPresentCase_ = 0;
+ private java.lang.Object timestampPresent_;
+ public enum TimestampPresentCase
+ implements com.google.protobuf.Internal.EnumLite {
+ TIMESTAMP(3),
+ TIMESTAMPPRESENT_NOT_SET(0);
+ private final int value;
+ private TimestampPresentCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static TimestampPresentCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static TimestampPresentCase forNumber(int value) {
+ switch (value) {
+ case 3: return TIMESTAMP;
+ case 0: return TIMESTAMPPRESENT_NOT_SET;
+ default: return null;
+ }
+ }
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public TimestampPresentCase
+ getTimestampPresentCase() {
+ return TimestampPresentCase.forNumber(
+ timestampPresentCase_);
+ }
+
+ public static final int JOURNAL_FIELD_NUMBER = 1;
+ private volatile java.lang.Object journal_;
+ /**
+ * string journal = 1;
+ */
+ public java.lang.String getJournal() {
+ java.lang.Object ref = journal_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ journal_ = s;
+ return s;
+ }
+ }
+ /**
+ * string journal = 1;
+ */
+ public com.google.protobuf.ByteString
+ getJournalBytes() {
+ java.lang.Object ref = journal_;
+ if (ref instanceof java.lang.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;
+ }
+ }
+
+ public static final int POSITION_FIELD_NUMBER = 2;
+ private long position_;
+ /**
+ * int64 position = 2;
+ */
+ public long getPosition() {
+ return position_;
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 3;
+ /**
+ * int64 timestamp = 3;
+ */
+ public long getTimestamp() {
+ if (timestampPresentCase_ == 3) {
+ return (java.lang.Long) timestampPresent_;
+ }
+ return 0L;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getJournalBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, journal_);
+ }
+ if (position_ != 0L) {
+ output.writeInt64(2, position_);
+ }
+ if (timestampPresentCase_ == 3) {
+ output.writeInt64(
+ 3, (long)((java.lang.Long) timestampPresent_));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getJournalBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, journal_);
+ }
+ if (position_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(2, position_);
+ }
+ if (timestampPresentCase_ == 3) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(
+ 3, (long)((java.lang.Long) timestampPresent_));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalPacket.Dump)) {
+ return super.equals(obj);
+ }
+ com.alibaba.otter.canal.protocol.CanalPacket.Dump other = (com.alibaba.otter.canal.protocol.CanalPacket.Dump) obj;
+
+ boolean result = true;
+ result = result && getJournal()
+ .equals(other.getJournal());
+ result = result && (getPosition()
+ == other.getPosition());
+ result = result && getTimestampPresentCase().equals(
+ other.getTimestampPresentCase());
+ if (!result) return false;
+ switch (timestampPresentCase_) {
+ case 3:
+ result = result && (getTimestamp()
+ == other.getTimestamp());
+ break;
+ case 0:
+ default:
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + JOURNAL_FIELD_NUMBER;
+ hash = (53 * hash) + getJournal().hashCode();
+ hash = (37 * hash) + POSITION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getPosition());
+ switch (timestampPresentCase_) {
+ case 3:
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTimestamp());
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ 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 PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ 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 PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.Dump prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
/**
- * Protobuf type {@code com.alibaba.otter.canal.protocol.Dump}
- *
*
* TBD when new packets are required
*
+ *
+ * Protobuf type {@code com.alibaba.otter.canal.protocol.Dump}
*/
- public static final class Dump extends com.google.protobuf.GeneratedMessage implements
- // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Dump)
- DumpOrBuilder {
-
- // Use Dump.newBuilder() to construct.
- private Dump(com.google.protobuf.GeneratedMessage.Builder> builder){
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
-
- 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.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_;
- public static final int JOURNAL_FIELD_NUMBER = 1;
- private java.lang.Object journal_;
-
- /**
- * optional string journal = 1;
- */
- public boolean hasJournal() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
-
- /**
- * optional string journal = 1;
- */
- public java.lang.String getJournal() {
- java.lang.Object ref = journal_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- journal_ = s;
- }
- return s;
- }
- }
-
- /**
- * optional string journal = 1;
- */
- public com.google.protobuf.ByteString getJournalBytes() {
- java.lang.Object ref = journal_;
- if (ref instanceof java.lang.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;
- }
- }
-
- 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_;
- }
-
- 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;
- timestamp_ = 0L;
- }
-
- 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.writeBytes(1, getJournalBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeInt64(2, position_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeInt64(3, timestamp_);
- }
- 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.computeBytesSize(1, getJournalBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, position_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, timestamp_);
- }
- 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.Dump parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- 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 PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- 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 PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- 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 PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static com.alibaba.otter.canal.protocol.CanalPacket.Dump parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- 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 {
- 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 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 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
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.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;
+ }
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor;
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ 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);
+ }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
- 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();
+ }
- // Construct using
- // com.alibaba.otter.canal.protocol.CanalPacket.Dump.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();
- journal_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- position_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000002);
- timestamp_ = 0L;
- 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.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()) {
- throw newUninitializedMessageException(result);
- }
- 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_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.journal_ = journal_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.position_ = position_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.timestamp_ = timestamp_;
- result.bitField0_ = to_bitField0_;
- 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);
- } else {
- super.mergeFrom(other);
- 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()) {
- bitField0_ |= 0x00000001;
- journal_ = other.journal_;
- onChanged();
- }
- if (other.hasPosition()) {
- setPosition(other.getPosition());
- }
- if (other.hasTimestamp()) {
- setTimestamp(other.getTimestamp());
- }
- 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.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_;
-
- private java.lang.Object journal_ = "";
-
- /**
- * optional string journal = 1;
- */
- public boolean hasJournal() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
-
- /**
- * optional string journal = 1;
- */
- public java.lang.String getJournal() {
- java.lang.Object ref = journal_;
- 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 (java.lang.String) ref;
- }
- }
-
- /**
- * 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();
- }
- bitField0_ |= 0x00000001;
- journal_ = value;
- onChanged();
- return this;
- }
-
- /**
- * optional string journal = 1;
- */
- public Builder clearJournal() {
- bitField0_ = (bitField0_ & ~0x00000001);
- journal_ = getDefaultInstance().getJournal();
- onChanged();
- return this;
- }
-
- /**
- * 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;
- }
-
- 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;
- }
-
- 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)
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
}
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ journal_ = "";
- static {
- defaultInstance = new Dump(true);
- defaultInstance.initFields();
+ position_ = 0L;
+
+ timestampPresentCase_ = 0;
+ timestampPresent_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor;
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Dump getDefaultInstanceForType() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.Dump.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Dump build() {
+ com.alibaba.otter.canal.protocol.CanalPacket.Dump result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
}
+ return result;
+ }
- // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Dump)
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Dump buildPartial() {
+ com.alibaba.otter.canal.protocol.CanalPacket.Dump result = new com.alibaba.otter.canal.protocol.CanalPacket.Dump(this);
+ result.journal_ = journal_;
+ result.position_ = position_;
+ if (timestampPresentCase_ == 3) {
+ result.timestampPresent_ = timestampPresent_;
+ }
+ result.timestampPresentCase_ = timestampPresentCase_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ 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);
+ } else {
+ super.mergeFrom(other);
+ 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.getJournal().isEmpty()) {
+ journal_ = other.journal_;
+ onChanged();
+ }
+ if (other.getPosition() != 0L) {
+ setPosition(other.getPosition());
+ }
+ switch (other.getTimestampPresentCase()) {
+ case TIMESTAMP: {
+ setTimestamp(other.getTimestamp());
+ break;
+ }
+ case TIMESTAMPPRESENT_NOT_SET: {
+ break;
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ 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.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int timestampPresentCase_ = 0;
+ private java.lang.Object timestampPresent_;
+ public TimestampPresentCase
+ getTimestampPresentCase() {
+ return TimestampPresentCase.forNumber(
+ timestampPresentCase_);
+ }
+
+ public Builder clearTimestampPresent() {
+ timestampPresentCase_ = 0;
+ timestampPresent_ = null;
+ onChanged();
+ return this;
+ }
+
+
+ private java.lang.Object journal_ = "";
+ /**
+ * string journal = 1;
+ */
+ public java.lang.String getJournal() {
+ java.lang.Object ref = journal_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ journal_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * 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;
+ }
+ }
+ /**
+ * string journal = 1;
+ */
+ public Builder setJournal(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ journal_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string journal = 1;
+ */
+ public Builder clearJournal() {
+
+ journal_ = getDefaultInstance().getJournal();
+ onChanged();
+ return this;
+ }
+ /**
+ * string journal = 1;
+ */
+ public Builder setJournalBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ journal_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long position_ ;
+ /**
+ * int64 position = 2;
+ */
+ public long getPosition() {
+ return position_;
+ }
+ /**
+ * int64 position = 2;
+ */
+ public Builder setPosition(long value) {
+
+ position_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 position = 2;
+ */
+ public Builder clearPosition() {
+
+ position_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * int64 timestamp = 3;
+ */
+ public long getTimestamp() {
+ if (timestampPresentCase_ == 3) {
+ return (java.lang.Long) timestampPresent_;
+ }
+ return 0L;
+ }
+ /**
+ * int64 timestamp = 3;
+ */
+ public Builder setTimestamp(long value) {
+ timestampPresentCase_ = 3;
+ timestampPresent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 timestamp = 3;
+ */
+ public Builder clearTimestamp() {
+ if (timestampPresentCase_ == 3) {
+ timestampPresentCase_ = 0;
+ timestampPresent_ = null;
+ onChanged();
+ }
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Dump)
}
- 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();
-
- /**
- * optional string destination = 1;
- */
- java.lang.String getDestination();
-
- /**
- * optional string destination = 1;
- */
- com.google.protobuf.ByteString getDestinationBytes();
-
- /**
- * optional string client_id = 2;
- */
- boolean hasClientId();
-
- /**
- * 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();
+ // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Dump)
+ private static final com.alibaba.otter.canal.protocol.CanalPacket.Dump DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalPacket.Dump();
}
+ public static com.alibaba.otter.canal.protocol.CanalPacket.Dump getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public Dump parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Dump(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.Dump getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface ClientRollbackOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.ClientRollback)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * string destination = 1;
+ */
+ java.lang.String getDestination();
+ /**
+ * string destination = 1;
+ */
+ com.google.protobuf.ByteString
+ getDestinationBytes();
+
+ /**
+ * string client_id = 2;
+ */
+ java.lang.String getClientId();
+ /**
+ * string client_id = 2;
+ */
+ com.google.protobuf.ByteString
+ getClientIdBytes();
+
+ /**
+ * int64 batch_id = 3;
+ */
+ long getBatchId();
+ }
+ /**
+ * Protobuf type {@code com.alibaba.otter.canal.protocol.ClientRollback}
+ */
+ public static final class ClientRollback extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ClientRollback)
+ ClientRollbackOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use ClientRollback.newBuilder() to construct.
+ private ClientRollback(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ClientRollback() {
+ destination_ = "";
+ clientId_ = "";
+ batchId_ = 0L;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ClientRollback(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ destination_ = s;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ clientId_ = s;
+ break;
+ }
+ case 24: {
+
+ batchId_ = input.readInt64();
+ break;
+ }
+ default: {
+ if (!parseUnknownFieldProto3(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ 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 final int DESTINATION_FIELD_NUMBER = 1;
+ private volatile java.lang.Object destination_;
+ /**
+ * string destination = 1;
+ */
+ public java.lang.String getDestination() {
+ java.lang.Object ref = destination_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ destination_ = s;
+ return s;
+ }
+ }
+ /**
+ * string destination = 1;
+ */
+ public com.google.protobuf.ByteString
+ getDestinationBytes() {
+ java.lang.Object ref = destination_;
+ if (ref instanceof java.lang.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;
+ }
+ }
+
+ public static final int CLIENT_ID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object clientId_;
+ /**
+ * string client_id = 2;
+ */
+ public java.lang.String getClientId() {
+ java.lang.Object ref = clientId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ clientId_ = s;
+ return s;
+ }
+ }
+ /**
+ * string client_id = 2;
+ */
+ public com.google.protobuf.ByteString
+ getClientIdBytes() {
+ java.lang.Object ref = clientId_;
+ if (ref instanceof java.lang.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;
+ }
+ }
+
+ public static final int BATCH_ID_FIELD_NUMBER = 3;
+ private long batchId_;
+ /**
+ * int64 batch_id = 3;
+ */
+ public long getBatchId() {
+ return batchId_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getDestinationBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_);
+ }
+ if (!getClientIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_);
+ }
+ if (batchId_ != 0L) {
+ output.writeInt64(3, batchId_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getDestinationBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_);
+ }
+ if (!getClientIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_);
+ }
+ if (batchId_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(3, batchId_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback)) {
+ return super.equals(obj);
+ }
+ com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback other = (com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback) obj;
+
+ boolean result = true;
+ result = result && getDestination()
+ .equals(other.getDestination());
+ result = result && getClientId()
+ .equals(other.getClientId());
+ result = result && (getBatchId()
+ == other.getBatchId());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + DESTINATION_FIELD_NUMBER;
+ hash = (53 * hash) + getDestination().hashCode();
+ hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getClientId().hashCode();
+ hash = (37 * hash) + BATCH_ID_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getBatchId());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ 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 PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ 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 PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
/**
* Protobuf type {@code com.alibaba.otter.canal.protocol.ClientRollback}
*/
- public static final class ClientRollback extends com.google.protobuf.GeneratedMessage implements
- // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.ClientRollback)
- ClientRollbackOrBuilder {
-
- // Use ClientRollback.newBuilder() to construct.
- private ClientRollback(com.google.protobuf.GeneratedMessage.Builder> builder){
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
-
- 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.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_;
- public static final int DESTINATION_FIELD_NUMBER = 1;
- private java.lang.Object destination_;
-
- /**
- * optional string destination = 1;
- */
- public boolean hasDestination() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
-
- /**
- * optional string destination = 1;
- */
- public java.lang.String getDestination() {
- java.lang.Object ref = destination_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- destination_ = s;
- }
- return s;
- }
- }
-
- /**
- * optional string destination = 1;
- */
- public com.google.protobuf.ByteString getDestinationBytes() {
- java.lang.Object ref = destination_;
- if (ref instanceof java.lang.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;
- }
- }
-
- 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);
- }
-
- /**
- * optional string client_id = 2;
- */
- public java.lang.String getClientId() {
- java.lang.Object ref = clientId_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- clientId_ = s;
- }
- return s;
- }
- }
-
- /**
- * optional string client_id = 2;
- */
- public com.google.protobuf.ByteString getClientIdBytes() {
- java.lang.Object ref = clientId_;
- if (ref instanceof java.lang.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;
- }
- }
-
- 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_ = "";
- batchId_ = 0L;
- }
-
- 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.writeBytes(1, getDestinationBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, getClientIdBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeInt64(3, batchId_);
- }
- 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.computeBytesSize(1, getDestinationBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, getClientIdBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, batchId_);
- }
- 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.ClientRollback parseFrom(com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- 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 PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- 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 PARSER.parseFrom(data, extensionRegistry);
- }
-
- public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- 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 PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- 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 {
- 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 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 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
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.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;
+ }
- public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
- return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor;
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ 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);
+ }
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
- 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();
+ }
- // Construct using
- // com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.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();
- destination_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- clientId_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- batchId_ = 0L;
- 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.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()) {
- throw newUninitializedMessageException(result);
- }
- 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_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.destination_ = destination_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.clientId_ = clientId_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.batchId_ = batchId_;
- result.bitField0_ = to_bitField0_;
- 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);
- } else {
- super.mergeFrom(other);
- 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()) {
- bitField0_ |= 0x00000001;
- destination_ = other.destination_;
- onChanged();
- }
- if (other.hasClientId()) {
- bitField0_ |= 0x00000002;
- clientId_ = other.clientId_;
- onChanged();
- }
- if (other.hasBatchId()) {
- setBatchId(other.getBatchId());
- }
- 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.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_;
-
- private java.lang.Object destination_ = "";
-
- /**
- * optional string destination = 1;
- */
- public boolean hasDestination() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
-
- /**
- * optional string destination = 1;
- */
- public java.lang.String getDestination() {
- java.lang.Object ref = destination_;
- 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 (java.lang.String) ref;
- }
- }
-
- /**
- * 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();
- }
- bitField0_ |= 0x00000001;
- destination_ = value;
- onChanged();
- return this;
- }
-
- /**
- * optional string destination = 1;
- */
- public Builder clearDestination() {
- bitField0_ = (bitField0_ & ~0x00000001);
- destination_ = getDefaultInstance().getDestination();
- onChanged();
- return this;
- }
-
- /**
- * 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;
- }
-
- private java.lang.Object clientId_ = "";
-
- /**
- * optional string client_id = 2;
- */
- public boolean hasClientId() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
-
- /**
- * optional string client_id = 2;
- */
- public java.lang.String getClientId() {
- java.lang.Object ref = clientId_;
- 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 (java.lang.String) ref;
- }
- }
-
- /**
- * 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();
- }
- bitField0_ |= 0x00000002;
- clientId_ = value;
- onChanged();
- return this;
- }
-
- /**
- * optional string client_id = 2;
- */
- public Builder clearClientId() {
- bitField0_ = (bitField0_ & ~0x00000002);
- clientId_ = getDefaultInstance().getClientId();
- onChanged();
- return this;
- }
-
- /**
- * 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;
- }
-
- 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)
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
}
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ destination_ = "";
- static {
- defaultInstance = new ClientRollback(true);
- defaultInstance.initFields();
+ clientId_ = "";
+
+ batchId_ = 0L;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor;
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback getDefaultInstanceForType() {
+ return com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback build() {
+ com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
}
+ return result;
+ }
- // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.ClientRollback)
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback buildPartial() {
+ com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback result = new com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback(this);
+ result.destination_ = destination_;
+ result.clientId_ = clientId_;
+ result.batchId_ = batchId_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ 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);
+ } else {
+ super.mergeFrom(other);
+ 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.getDestination().isEmpty()) {
+ destination_ = other.destination_;
+ onChanged();
+ }
+ if (!other.getClientId().isEmpty()) {
+ clientId_ = other.clientId_;
+ onChanged();
+ }
+ if (other.getBatchId() != 0L) {
+ setBatchId(other.getBatchId());
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ 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.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private java.lang.Object destination_ = "";
+ /**
+ * string destination = 1;
+ */
+ public java.lang.String getDestination() {
+ java.lang.Object ref = destination_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ destination_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * 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;
+ }
+ }
+ /**
+ * string destination = 1;
+ */
+ public Builder setDestination(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ destination_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string destination = 1;
+ */
+ public Builder clearDestination() {
+
+ destination_ = getDefaultInstance().getDestination();
+ onChanged();
+ return this;
+ }
+ /**
+ * string destination = 1;
+ */
+ public Builder setDestinationBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ destination_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object clientId_ = "";
+ /**
+ * string client_id = 2;
+ */
+ public java.lang.String getClientId() {
+ java.lang.Object ref = clientId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ clientId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * 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;
+ }
+ }
+ /**
+ * string client_id = 2;
+ */
+ public Builder setClientId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ clientId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string client_id = 2;
+ */
+ public Builder clearClientId() {
+
+ clientId_ = getDefaultInstance().getClientId();
+ onChanged();
+ return this;
+ }
+ /**
+ * string client_id = 2;
+ */
+ public Builder setClientIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ clientId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long batchId_ ;
+ /**
+ * int64 batch_id = 3;
+ */
+ public long getBatchId() {
+ return batchId_;
+ }
+ /**
+ * int64 batch_id = 3;
+ */
+ public Builder setBatchId(long value) {
+
+ batchId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 batch_id = 3;
+ */
+ public Builder clearBatchId() {
+
+ batchId_ = 0L;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.ClientRollback)
}
- 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 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 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 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 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 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 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 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 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 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 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 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;
- }
-
- private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+ // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.ClientRollback)
+ private static final com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback DEFAULT_INSTANCE;
static {
- java.lang.String[] descriptorData = {
- "\n\023CanalProtocol.proto\022 com.alibaba.otter"
- + ".canal.protocol\"\312\001\n\006Packet\022\030\n\014magic_numb"
- + "er\030\001 \001(\005:\00217\022\022\n\007version\030\002 \001(\005:\0011\022:\n\004type"
- + "\030\003 \001(\0162,.com.alibaba.otter.canal.protoco"
- + "l.PacketType\022H\n\013compression\030\004 \001(\0162-.com."
- + "alibaba.otter.canal.protocol.Compression"
- + ":\004NONE\022\014\n\004body\030\005 \001(\014\"<\n\tHeartBeat\022\026\n\016sen"
- + "d_timestamp\030\001 \001(\003\022\027\n\017start_timestamp\030\002 \001"
- + "(\003\"\217\001\n\tHandshake\022$\n\026communication_encodi"
- + "ng\030\001 \001(\t:\004utf8\022\r\n\005seeds\030\002 \001(\014\022M\n\026support",
- "ed_compressions\030\003 \003(\0162-.com.alibaba.otte"
- + "r.canal.protocol.Compression\"\274\001\n\nClientA"
- + "uth\022\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\014\022"
- + "\033\n\020net_read_timeout\030\003 \001(\005:\0010\022\034\n\021net_writ"
- + "e_timeout\030\004 \001(\005:\0010\022\023\n\013destination\030\005 \001(\t\022"
- + "\021\n\tclient_id\030\006 \001(\t\022\016\n\006filter\030\007 \001(\t\022\027\n\017st"
- + "art_timestamp\030\010 \001(\003\"3\n\003Ack\022\025\n\nerror_code"
- + "\030\001 \001(\005:\0010\022\025\n\rerror_message\030\002 \001(\t\"E\n\tClie"
- + "ntAck\022\023\n\013destination\030\001 \001(\t\022\021\n\tclient_id\030"
- + "\002 \001(\t\022\020\n\010batch_id\030\003 \001(\003\"=\n\003Sub\022\023\n\013destin",
- "ation\030\001 \001(\t\022\021\n\tclient_id\030\002 \001(\t\022\016\n\006filter"
- + "\030\007 \001(\t\"?\n\005Unsub\022\023\n\013destination\030\001 \001(\t\022\021\n\t"
- + "client_id\030\002 \001(\t\022\016\n\006filter\030\007 \001(\t\"\200\001\n\003Get\022"
- + "\023\n\013destination\030\001 \001(\t\022\021\n\tclient_id\030\002 \001(\t\022"
- + "\022\n\nfetch_size\030\003 \001(\005\022\023\n\007timeout\030\004 \001(\003:\002-1"
- + "\022\017\n\004unit\030\005 \001(\005:\0012\022\027\n\010auto_ack\030\006 \001(\010:\005fal"
- + "se\".\n\010Messages\022\020\n\010batch_id\030\001 \001(\003\022\020\n\010mess"
- + "ages\030\002 \003(\014\"?\n\004Dump\022\017\n\007journal\030\001 \001(\t\022\020\n\010p"
- + "osition\030\002 \001(\003\022\024\n\ttimestamp\030\003 \001(\003:\0010\"J\n\016C"
- + "lientRollback\022\023\n\013destination\030\001 \001(\t\022\021\n\tcl",
- "ient_id\030\002 \001(\t\022\020\n\010batch_id\030\003 \001(\003*4\n\013Compr"
- + "ession\022\010\n\004NONE\020\001\022\010\n\004ZLIB\020\002\022\010\n\004GZIP\020\003\022\007\n\003"
- + "LZF\020\004*\305\001\n\nPacketType\022\r\n\tHANDSHAKE\020\001\022\030\n\024C"
- + "LIENTAUTHENTICATION\020\002\022\007\n\003ACK\020\003\022\020\n\014SUBSCR"
- + "IPTION\020\004\022\022\n\016UNSUBSCRIPTION\020\005\022\007\n\003GET\020\006\022\014\n"
- + "\010MESSAGES\020\007\022\r\n\tCLIENTACK\020\010\022\014\n\010SHUTDOWN\020\t"
- + "\022\010\n\004DUMP\020\n\022\r\n\tHEARTBEAT\020\013\022\022\n\016CLIENTROLLB"
- + "ACK\020\014B1\n com.alibaba.otter.canal.protoco" + "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;
- 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", });
+ DEFAULT_INSTANCE = new com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback();
}
- // @@protoc_insertion_point(outer_class_scope)
+ public static com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public ClientRollback parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new ClientRollback(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.alibaba.otter.canal.protocol.CanalPacket.ClientRollback getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_Get_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable;
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\023CanalProtocol.proto\022 com.alibaba.otter" +
+ ".canal.protocol\"\205\002\n\006Packet\022\026\n\014magic_numb" +
+ "er\030\001 \001(\005H\000\022\021\n\007version\030\002 \001(\005H\001\022:\n\004type\030\003 " +
+ "\001(\0162,.com.alibaba.otter.canal.protocol.P" +
+ "acketType\022D\n\013compression\030\004 \001(\0162-.com.ali" +
+ "baba.otter.canal.protocol.CompressionH\002\022" +
+ "\014\n\004body\030\005 \001(\014B\026\n\024magic_number_presentB\021\n" +
+ "\017version_presentB\025\n\023compression_present\"" +
+ "<\n\tHeartBeat\022\026\n\016send_timestamp\030\001 \001(\003\022\027\n\017" +
+ "start_timestamp\030\002 \001(\003\"\255\001\n\tHandshake\022 \n\026c" +
+ "ommunication_encoding\030\001 \001(\tH\000\022\r\n\005seeds\030\002" +
+ " \001(\014\022M\n\026supported_compressions\030\003 \001(\0162-.c" +
+ "om.alibaba.otter.canal.protocol.Compress" +
+ "ionB \n\036communication_encoding_present\"\363\001" +
+ "\n\nClientAuth\022\020\n\010username\030\001 \001(\t\022\020\n\010passwo" +
+ "rd\030\002 \001(\014\022\032\n\020net_read_timeout\030\003 \001(\005H\000\022\033\n\021" +
+ "net_write_timeout\030\004 \001(\005H\001\022\023\n\013destination" +
+ "\030\005 \001(\t\022\021\n\tclient_id\030\006 \001(\t\022\016\n\006filter\030\007 \001(" +
+ "\t\022\027\n\017start_timestamp\030\010 \001(\003B\032\n\030net_read_t" +
+ "imeout_presentB\033\n\031net_write_timeout_pres" +
+ "ent\"H\n\003Ack\022\024\n\nerror_code\030\001 \001(\005H\000\022\025\n\rerro" +
+ "r_message\030\002 \001(\tB\024\n\022error_code_present\"E\n" +
+ "\tClientAck\022\023\n\013destination\030\001 \001(\t\022\021\n\tclien" +
+ "t_id\030\002 \001(\t\022\020\n\010batch_id\030\003 \001(\003\"=\n\003Sub\022\023\n\013d" +
+ "estination\030\001 \001(\t\022\021\n\tclient_id\030\002 \001(\t\022\016\n\006f" +
+ "ilter\030\007 \001(\t\"?\n\005Unsub\022\023\n\013destination\030\001 \001(" +
+ "\t\022\021\n\tclient_id\030\002 \001(\t\022\016\n\006filter\030\007 \001(\t\"\257\001\n" +
+ "\003Get\022\023\n\013destination\030\001 \001(\t\022\021\n\tclient_id\030\002" +
+ " \001(\t\022\022\n\nfetch_size\030\003 \001(\005\022\021\n\007timeout\030\004 \001(" +
+ "\003H\000\022\016\n\004unit\030\005 \001(\005H\001\022\022\n\010auto_ack\030\006 \001(\010H\002B" +
+ "\021\n\017timeout_presentB\016\n\014unit_presentB\022\n\020au" +
+ "to_ack_present\".\n\010Messages\022\020\n\010batch_id\030\001" +
+ " \001(\003\022\020\n\010messages\030\002 \003(\014\"S\n\004Dump\022\017\n\007journa" +
+ "l\030\001 \001(\t\022\020\n\010position\030\002 \001(\003\022\023\n\ttimestamp\030\003" +
+ " \001(\003H\000B\023\n\021timestamp_present\"J\n\016ClientRol" +
+ "lback\022\023\n\013destination\030\001 \001(\t\022\021\n\tclient_id\030" +
+ "\002 \001(\t\022\020\n\010batch_id\030\003 \001(\003*U\n\013Compression\022\037" +
+ "\n\033COMPRESSIONCOMPATIBLEPROTO2\020\000\022\010\n\004NONE\020" +
+ "\001\022\010\n\004ZLIB\020\002\022\010\n\004GZIP\020\003\022\007\n\003LZF\020\004*\346\001\n\nPacke" +
+ "tType\022\037\n\033PACKAGETYPECOMPATIBLEPROTO2\020\000\022\r" +
+ "\n\tHANDSHAKE\020\001\022\030\n\024CLIENTAUTHENTICATION\020\002\022" +
+ "\007\n\003ACK\020\003\022\020\n\014SUBSCRIPTION\020\004\022\022\n\016UNSUBSCRIP" +
+ "TION\020\005\022\007\n\003GET\020\006\022\014\n\010MESSAGES\020\007\022\r\n\tCLIENTA" +
+ "CK\020\010\022\014\n\010SHUTDOWN\020\t\022\010\n\004DUMP\020\n\022\r\n\tHEARTBEA" +
+ "T\020\013\022\022\n\016CLIENTROLLBACK\020\014B1\n com.alibaba.o" +
+ "tter.canal.protocolB\013CanalPacketH\001b\006prot" +
+ "o3"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_com_alibaba_otter_canal_protocol_Packet_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_Packet_descriptor,
+ new java.lang.String[] { "MagicNumber", "Version", "Type", "Compression", "Body", "MagicNumberPresent", "VersionPresent", "CompressionPresent", });
+ internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_com_alibaba_otter_canal_protocol_HeartBeat_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_HeartBeat_descriptor,
+ new java.lang.String[] { "SendTimestamp", "StartTimestamp", });
+ internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_com_alibaba_otter_canal_protocol_Handshake_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_Handshake_descriptor,
+ new java.lang.String[] { "CommunicationEncoding", "Seeds", "SupportedCompressions", "CommunicationEncodingPresent", });
+ internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_com_alibaba_otter_canal_protocol_ClientAuth_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_ClientAuth_descriptor,
+ new java.lang.String[] { "Username", "Password", "NetReadTimeout", "NetWriteTimeout", "Destination", "ClientId", "Filter", "StartTimestamp", "NetReadTimeoutPresent", "NetWriteTimeoutPresent", });
+ internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_com_alibaba_otter_canal_protocol_Ack_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_Ack_descriptor,
+ new java.lang.String[] { "ErrorCode", "ErrorMessage", "ErrorCodePresent", });
+ internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor =
+ getDescriptor().getMessageTypes().get(5);
+ internal_static_com_alibaba_otter_canal_protocol_ClientAck_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_ClientAck_descriptor,
+ new java.lang.String[] { "Destination", "ClientId", "BatchId", });
+ internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor =
+ getDescriptor().getMessageTypes().get(6);
+ internal_static_com_alibaba_otter_canal_protocol_Sub_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_Sub_descriptor,
+ new java.lang.String[] { "Destination", "ClientId", "Filter", });
+ internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor =
+ getDescriptor().getMessageTypes().get(7);
+ internal_static_com_alibaba_otter_canal_protocol_Unsub_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_Unsub_descriptor,
+ new java.lang.String[] { "Destination", "ClientId", "Filter", });
+ internal_static_com_alibaba_otter_canal_protocol_Get_descriptor =
+ getDescriptor().getMessageTypes().get(8);
+ internal_static_com_alibaba_otter_canal_protocol_Get_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_Get_descriptor,
+ new java.lang.String[] { "Destination", "ClientId", "FetchSize", "Timeout", "Unit", "AutoAck", "TimeoutPresent", "UnitPresent", "AutoAckPresent", });
+ internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor =
+ getDescriptor().getMessageTypes().get(9);
+ internal_static_com_alibaba_otter_canal_protocol_Messages_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_Messages_descriptor,
+ new java.lang.String[] { "BatchId", "Messages", });
+ internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor =
+ getDescriptor().getMessageTypes().get(10);
+ internal_static_com_alibaba_otter_canal_protocol_Dump_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_Dump_descriptor,
+ new java.lang.String[] { "Journal", "Position", "Timestamp", "TimestampPresent", });
+ internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor =
+ getDescriptor().getMessageTypes().get(11);
+ internal_static_com_alibaba_otter_canal_protocol_ClientRollback_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_com_alibaba_otter_canal_protocol_ClientRollback_descriptor,
+ new java.lang.String[] { "Destination", "ClientId", "BatchId", });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
}
diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalProtocol.proto b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalProtocol.proto
index 80f03439..e4e35b6d 100644
--- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalProtocol.proto
+++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalProtocol.proto
@@ -1,3 +1,4 @@
+syntax = "proto3";
package com.alibaba.otter.canal.protocol;
option java_package = "com.alibaba.otter.canal.protocol";
@@ -5,6 +6,7 @@ option java_outer_classname = "CanalPacket";
option optimize_for = SPEED;
enum Compression {
+ COMPRESSIONCOMPATIBLEPROTO2 = 0;
NONE = 1;
ZLIB = 2;
GZIP = 3;
@@ -12,6 +14,8 @@ enum Compression {
}
enum PacketType {
+ //compatible
+ PACKAGETYPECOMPATIBLEPROTO2 = 0;
HANDSHAKE = 1;
CLIENTAUTHENTICATION = 2;
ACK = 3;
@@ -29,86 +33,122 @@ enum PacketType {
}
message Packet {
- optional int32 magic_number = 1 [default = 17];
- optional int32 version = 2 [default = 1];
- optional PacketType type = 3;
- optional Compression compression = 4 [default = NONE];
- optional bytes body = 5;
+ //[default = 17];
+ oneof magic_number_present {
+ int32 magic_number = 1;
+ }
+ //[default = 1];
+ oneof version_present {
+ int32 version = 2;
+ };
+ PacketType type = 3;
+ //[default = NONE];
+ oneof compression_present {
+ Compression compression = 4;
+ }
+
+ bytes body = 5;
}
message HeartBeat {
- optional int64 send_timestamp = 1;
- optional int64 start_timestamp = 2;
+ int64 send_timestamp = 1;
+ int64 start_timestamp = 2;
}
message Handshake {
- optional string communication_encoding = 1 [default = "utf8"];
- optional bytes seeds = 2;
- repeated Compression supported_compressions = 3;
+ // [default = "utf8"];
+ oneof communication_encoding_present {
+ string communication_encoding = 1;
+ }
+ bytes seeds = 2;
+ Compression supported_compressions = 3;
}
// client authentication
message ClientAuth {
- optional string username = 1;
- optional bytes password = 2; // hashed password with seeds from Handshake message
- optional int32 net_read_timeout = 3 [default = 0]; // in seconds
- optional int32 net_write_timeout = 4 [default = 0]; // in seconds
- optional string destination = 5;
- optional string client_id = 6;
- optional string filter = 7;
- optional int64 start_timestamp = 8;
+ string username = 1;
+ bytes password = 2; // hashed password with seeds from Handshake message
+ // [default = 0]
+ oneof net_read_timeout_present {
+ int32 net_read_timeout = 3; // in seconds
+ }
+ // [default = 0];
+ oneof net_write_timeout_present {
+ int32 net_write_timeout = 4; // in seconds
+ }
+ string destination = 5;
+ string client_id = 6;
+ string filter = 7;
+ int64 start_timestamp = 8;
}
message Ack {
- optional int32 error_code = 1 [default = 0];
- optional string error_message = 2; // if something like compression is not supported, erorr_message will tell about it.
+ //[default = 0]
+ oneof error_code_present {
+ int32 error_code = 1;
+ }
+ string error_message = 2; // if something like compression is not supported, erorr_message will tell about it.
}
message ClientAck {
- optional string destination = 1;
- optional string client_id = 2;
- optional int64 batch_id = 3;
+ string destination = 1;
+ string client_id = 2;
+ int64 batch_id = 3;
}
// subscription
message Sub {
- optional string destination = 1;
- optional string client_id = 2;
- optional string filter = 7;
+ string destination = 1;
+ string client_id = 2;
+ string filter = 7;
}
// Unsubscription
message Unsub {
- optional string destination = 1;
- optional string client_id = 2;
- optional string filter = 7;
+ string destination = 1;
+ string client_id = 2;
+ string filter = 7;
}
// PullRequest
message Get {
- optional string destination = 1;
- optional string client_id = 2;
- optional int32 fetch_size = 3;
- optional int64 timeout = 4 [default = -1]; // 默认-1时代表不控制
- optional int32 unit = 5 [default = 2];// 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
- optional bool auto_ack = 6 [default = false]; // 是否自动ack
+ string destination = 1;
+ string client_id = 2;
+ int32 fetch_size = 3;
+ //[default = -1]
+ oneof timeout_present {
+ int64 timeout = 4; // 默认-1时代表不控制
+ }
+ //[default = 2]
+ oneof unit_present {
+ int32 unit = 5;// 数字类型,0:纳秒,1:毫秒,2:微秒,3:秒,4:分钟,5:小时,6:天
+ }
+ //[default = false]
+ oneof auto_ack_present {
+ bool auto_ack = 6; // 是否自动ack
+ }
+
}
//
message Messages {
- optional int64 batch_id = 1;
+ int64 batch_id = 1;
repeated bytes messages = 2;
}
// TBD when new packets are required
message Dump{
- optional string journal = 1;
- optional int64 position = 2;
- optional int64 timestamp = 3 [default = 0];
+ string journal = 1;
+ int64 position = 2;
+ // [default = 0]
+ oneof timestamp_present {
+ int64 timestamp = 3;
+ }
+
}
message ClientRollback{
- optional string destination = 1;
- optional string client_id = 2;
- optional int64 batch_id = 3;
+ string destination = 1;
+ string client_id = 2;
+ int64 batch_id = 3;
}
\ No newline at end of file
diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto b/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto
index 526db41f..1330bbc7 100644
--- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto
+++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto
@@ -1,3 +1,4 @@
+syntax = "proto3";
package com.alibaba.otter.canal.protocol;
option java_package = "com.alibaba.otter.canal.protocol";
@@ -10,88 +11,101 @@ option optimize_for = SPEED;
****************************************************************/
message Entry {
/**协议头部信息**/
- optional Header header = 1;
-
- /**打散后的事件类型**/
- optional EntryType entryType = 2 [default = ROWDATA];
-
+ Header header = 1;
+ ///**打散后的事件类型**/ [default = ROWDATA]
+ oneof entryType_present{
+ EntryType entryType = 2;
+ }
+
/**传输的二进制数组**/
- optional bytes storeValue = 3;
+ bytes storeValue = 3;
}
/**message Header**/
message Header {
- /**协议的版本号**/
- optional int32 version = 1 [default = 1];
-
+ /**协议的版本号**/ //[default = 1]
+ oneof version_present {
+ int32 version = 1;
+ }
+
+
/**binlog/redolog 文件名**/
- optional string logfileName = 2;
-
+ string logfileName = 2;
+
/**binlog/redolog 文件的偏移位置**/
- optional int64 logfileOffset = 3;
-
+ int64 logfileOffset = 3;
+
/**服务端serverId**/
- optional int64 serverId = 4;
-
+ int64 serverId = 4;
+
/** 变更数据的编码 **/
- optional string serverenCode = 5;
-
+ string serverenCode = 5;
+
/**变更数据的执行时间 **/
- optional int64 executeTime = 6;
-
- /** 变更数据的来源**/
- optional Type sourceType = 7 [default = MYSQL];
-
+ int64 executeTime = 6;
+
+ /** 变更数据的来源**/ //[default = MYSQL]
+ oneof sourceType_present {
+ Type sourceType = 7;
+ }
+
+
/** 变更数据的schemaname**/
- optional string schemaName = 8;
-
+ string schemaName = 8;
+
/**变更数据的tablename**/
- optional string tableName = 9;
-
+ string tableName = 9;
+
/**每个event的长度**/
- optional int64 eventLength = 10;
-
- /**数据变更类型**/
- optional EventType eventType = 11 [default = UPDATE];
-
+ int64 eventLength = 10;
+
+ /**数据变更类型**/ // [default = UPDATE]
+ oneof eventType_present {
+ EventType eventType = 11;
+ }
+
+
/**预留扩展**/
repeated Pair props = 12;
/**当前事务的gitd**/
- optional string gtid = 13;
+ string gtid = 13;
}
/**每个字段的数据结构**/
message Column {
/**字段下标**/
- optional int32 index = 1;
-
+ int32 index = 1;
+
/**字段java中类型**/
- optional int32 sqlType = 2;
-
+ int32 sqlType = 2;
+
/**字段名称(忽略大小写),在mysql中是没有的**/
- optional string name = 3;
-
+ string name = 3;
+
/**是否是主键**/
- optional bool isKey = 4;
-
+ bool isKey = 4;
+
/**如果EventType=UPDATE,用于标识这个字段值是否有修改**/
- optional bool updated = 5;
-
- /** 标识是否为空 **/
- optional bool isNull = 6 [default = false];
-
+ bool updated = 5;
+
+ /** 标识是否为空 **/ //[default = false]
+ oneof isNull_present {
+ bool isNull = 6;
+ }
+
+
/**预留扩展**/
- repeated Pair props = 7;
-
+ repeated Pair props = 7;
+
/** 字段值,timestamp,Datetime是一个时间格式的文本 **/
- optional string value = 8;
-
+ string value = 8;
+
/** 对应数据对象原始长度 **/
- optional int32 length = 9;
-
+ int32 length = 9;
+
/**字段mysql类型**/
- optional string mysqlType = 10;
+ string mysqlType = 10;
}
message RowData {
@@ -101,73 +115,81 @@ message RowData {
/** 字段信息,增量数据(修改后,新增后) **/
repeated Column afterColumns = 2;
-
+
/**预留扩展**/
- repeated Pair props = 3;
+ repeated Pair props = 3;
}
/**message row 每行变更数据的数据结构**/
message RowChange {
/**tableId,由数据库产生**/
- optional int64 tableId = 1;
-
- /**数据变更类型**/
- optional EventType eventType = 2 [default = UPDATE];
-
- /** 标识是否是ddl语句 **/
- optional bool isDdl = 10 [default = false];
+ int64 tableId = 1;
+
+
+ /**数据变更类型**/ //[default = UPDATE]
+ oneof eventType_present {
+ EventType eventType = 2;
+ }
+
+
+ /** 标识是否是ddl语句 **/ // [default = false]
+ oneof isDdl_present {
+ bool isDdl = 10;
+ }
+
/** ddl/query的sql语句 **/
- optional string sql = 11;
-
+ string sql = 11;
+
/** 一次数据库变更可能存在多行 **/
repeated RowData rowDatas = 12;
-
+
/**预留扩展**/
- repeated Pair props = 13;
-
+ repeated Pair props = 13;
+
/** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName **/
- optional string ddlSchemaName = 14;
+ string ddlSchemaName = 14;
}
/**开始事务的一些信息**/
message TransactionBegin{
-
+
/**已废弃,请使用header里的executeTime**/
- optional int64 executeTime = 1;
-
+ int64 executeTime = 1;
+
/**已废弃,Begin里不提供事务id**/
- optional string transactionId = 2;
-
+ string transactionId = 2;
+
/**预留扩展**/
- repeated Pair props = 3;
-
+ repeated Pair props = 3;
+
/**执行的thread Id**/
- optional int64 threadId = 4;
+ int64 threadId = 4;
}
/**结束事务的一些信息**/
message TransactionEnd{
-
+
/**已废弃,请使用header里的executeTime**/
- optional int64 executeTime = 1;
-
+ int64 executeTime = 1;
+
/**事务号**/
- optional string transactionId = 2;
-
+ string transactionId = 2;
+
/**预留扩展**/
- repeated Pair props = 3;
+ repeated Pair props = 3;
}
/**预留扩展**/
message Pair{
- optional string key = 1;
- optional string value = 2;
+ string key = 1;
+ string value = 2;
}
/**打散后的事件类型,主要用于标识事务的开始,变更数据,结束**/
enum EntryType{
+ ENTRYTYPECOMPATIBLEPROTO2 = 0;
TRANSACTIONBEGIN = 1;
ROWDATA = 2;
TRANSACTIONEND = 3;
@@ -178,6 +200,7 @@ enum EntryType{
/** 事件类型 **/
enum EventType {
+ EVENTTYPECOMPATIBLEPROTO2 = 0;
INSERT = 1;
UPDATE = 2;
DELETE = 3;
@@ -200,6 +223,7 @@ enum EventType {
/**数据库类型**/
enum Type {
+ TYPECOMPATIBLEPROTO2 = 0;
ORACLE = 1;
MYSQL = 2;
PGSQL = 3;
diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/FlatMessage.java b/protocol/src/main/java/com/alibaba/otter/canal/protocol/FlatMessage.java
new file mode 100644
index 00000000..51bd320a
--- /dev/null
+++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/FlatMessage.java
@@ -0,0 +1,304 @@
+package com.alibaba.otter.canal.protocol;
+
+import java.io.Serializable;
+import java.util.*;
+
+import com.google.protobuf.ByteString;
+
+/**
+ * @author machengyuan 2018-9-13 下午10:31:14
+ * @version 1.0.0
+ */
+public class FlatMessage implements Serializable {
+
+ private static final long serialVersionUID = -3386650678735860050L;
+
+ private long id;
+ private String database;
+ private String table;
+ private Boolean isDdl;
+ private String type;
+ private Long ts;
+ private String sql;
+ private Map sqlType;
+ private Map mysqlType;
+ private List