提交 199fc498 编写于 作者: Y yukon

Revert SendMessageRequestHeaderV2. Reviewed by @vintagewang @vongosling

上级 7d1af821
......@@ -24,65 +24,66 @@ import com.alibaba.rocketmq.remoting.exception.RemotingCommandException;
/**
* Use short variable name to speed up FastJson deserialization process.
* @author shijia.wxr
*/
public class SendMessageRequestHeaderV2 implements CommandCustomHeader {
@CFNotNull
private String producerGroup;
private String a; // producerGroup;
@CFNotNull
private String topic;
private String b; // topic;
@CFNotNull
private String defaultTopic;
private String c; // defaultTopic;
@CFNotNull
private Integer defaultTopicQueueNums;
private Integer d; // defaultTopicQueueNums;
@CFNotNull
private Integer queueId;
private Integer e; // queueId;
@CFNotNull
private Integer sysFlag;
private Integer f; // sysFlag;
@CFNotNull
private Long bornTimestamp;
private Long g; // bornTimestamp;
@CFNotNull
private Integer flag;
private Integer h; // flag;
@CFNullable
private String properties;
private String i; // properties;
@CFNullable
private Integer reconsumeTimes;
private Integer j; // reconsumeTimes;
@CFNullable
private boolean unitMode;
private boolean k; // unitMode = false;
private Integer consumeRetryTimes;
private Integer l; // consumeRetryTimes
public static SendMessageRequestHeader createSendMessageRequestHeaderV1(final SendMessageRequestHeaderV2 v2) {
SendMessageRequestHeader v1 = new SendMessageRequestHeader();
v1.setProducerGroup(v2.producerGroup);
v1.setTopic(v2.topic);
v1.setDefaultTopic(v2.defaultTopic);
v1.setDefaultTopicQueueNums(v2.defaultTopicQueueNums);
v1.setQueueId(v2.queueId);
v1.setSysFlag(v2.sysFlag);
v1.setBornTimestamp(v2.bornTimestamp);
v1.setFlag(v2.flag);
v1.setProperties(v2.properties);
v1.setReconsumeTimes(v2.reconsumeTimes);
v1.setUnitMode(v2.unitMode);
v1.setMaxReconsumeTimes(v2.consumeRetryTimes);
v1.setProducerGroup(v2.a);
v1.setTopic(v2.b);
v1.setDefaultTopic(v2.c);
v1.setDefaultTopicQueueNums(v2.d);
v1.setQueueId(v2.e);
v1.setSysFlag(v2.f);
v1.setBornTimestamp(v2.g);
v1.setFlag(v2.h);
v1.setProperties(v2.i);
v1.setReconsumeTimes(v2.j);
v1.setUnitMode(v2.k);
v1.setMaxReconsumeTimes(v2.l);
return v1;
}
public static SendMessageRequestHeaderV2 createSendMessageRequestHeaderV2(final SendMessageRequestHeader v1) {
SendMessageRequestHeaderV2 v2 = new SendMessageRequestHeaderV2();
v2.producerGroup = v1.getProducerGroup();
v2.topic = v1.getTopic();
v2.defaultTopic = v1.getDefaultTopic();
v2.defaultTopicQueueNums = v1.getDefaultTopicQueueNums();
v2.queueId = v1.getQueueId();
v2.sysFlag = v1.getSysFlag();
v2.bornTimestamp = v1.getBornTimestamp();
v2.flag = v1.getFlag();
v2.properties = v1.getProperties();
v2.reconsumeTimes = v1.getReconsumeTimes();
v2.unitMode = v1.isUnitMode();
v2.consumeRetryTimes = v1.getMaxReconsumeTimes();
v2.a = v1.getProducerGroup();
v2.b = v1.getTopic();
v2.c = v1.getDefaultTopic();
v2.d = v1.getDefaultTopicQueueNums();
v2.e = v1.getQueueId();
v2.f = v1.getSysFlag();
v2.g = v1.getBornTimestamp();
v2.h = v1.getFlag();
v2.i = v1.getProperties();
v2.j = v1.getReconsumeTimes();
v2.k = v1.isUnitMode();
v2.l = v1.getMaxReconsumeTimes();
return v2;
}
......@@ -90,122 +91,122 @@ public class SendMessageRequestHeaderV2 implements CommandCustomHeader {
public void checkFields() throws RemotingCommandException {
}
public String getProducerGroup() {
return producerGroup;
public String getA() {
return a;
}
public void setProducerGroup(String producerGroup) {
this.producerGroup = producerGroup;
public void setA(String a) {
this.a = a;
}
public String getTopic() {
return topic;
public String getB() {
return b;
}
public void setTopic(String topic) {
this.topic = topic;
public void setB(String b) {
this.b = b;
}
public String getDefaultTopic() {
return defaultTopic;
public String getC() {
return c;
}
public void setDefaultTopic(String defaultTopic) {
this.defaultTopic = defaultTopic;
public void setC(String c) {
this.c = c;
}
public Integer getDefaultTopicQueueNums() {
return defaultTopicQueueNums;
public Integer getD() {
return d;
}
public void setDefaultTopicQueueNums(Integer defaultTopicQueueNums) {
this.defaultTopicQueueNums = defaultTopicQueueNums;
public void setD(Integer d) {
this.d = d;
}
public Integer getQueueId() {
return queueId;
public Integer getE() {
return e;
}
public void setQueueId(Integer queueId) {
this.queueId = queueId;
public void setE(Integer e) {
this.e = e;
}
public Integer getSysFlag() {
return sysFlag;
public Integer getF() {
return f;
}
public void setSysFlag(Integer sysFlag) {
this.sysFlag = sysFlag;
public void setF(Integer f) {
this.f = f;
}
public Long getBornTimestamp() {
return bornTimestamp;
public Long getG() {
return g;
}
public void setBornTimestamp(Long bornTimestamp) {
this.bornTimestamp = bornTimestamp;
public void setG(Long g) {
this.g = g;
}
public Integer getFlag() {
return flag;
public Integer getH() {
return h;
}
public void setFlag(Integer flag) {
this.flag = flag;
public void setH(Integer h) {
this.h = h;
}
public String getProperties() {
return properties;
public String getI() {
return i;
}
public void setProperties(String properties) {
this.properties = properties;
public void setI(String i) {
this.i = i;
}
public Integer getReconsumeTimes() {
return reconsumeTimes;
public Integer getJ() {
return j;
}
public void setReconsumeTimes(Integer reconsumeTimes) {
this.reconsumeTimes = reconsumeTimes;
public void setJ(Integer j) {
this.j = j;
}
public boolean isUnitMode() {
return unitMode;
public boolean isK() {
return k;
}
public void setUnitMode(boolean unitMode) {
this.unitMode = unitMode;
public void setK(boolean k) {
this.k = k;
}
public Integer getConsumeRetryTimes() {
return consumeRetryTimes;
public Integer getL() {
return l;
}
public void setConsumeRetryTimes(final Integer consumeRetryTimes) {
this.consumeRetryTimes = consumeRetryTimes;
public void setL(final Integer l) {
this.l = l;
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册