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

Revert SendMessageRequestHeaderV2. Reviewed by @vintagewang @vongosling

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