提交 78b6d7b5 编写于 作者: J James Yin

fixed typo in RequestResponseFuture.

rename RequestResponseFuture.setSendReqeustOk to
RequestResponseFuture.setSendRequestOk.
上级 8ef01a6c
......@@ -1356,12 +1356,12 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this.sendDefaultImpl(msg, CommunicationMode.ASYNC, new SendCallback() {
@Override
public void onSuccess(SendResult sendResult) {
requestResponseFuture.setSendReqeustOk(true);
requestResponseFuture.setSendRequestOk(true);
}
@Override
public void onException(Throwable e) {
requestResponseFuture.setSendReqeustOk(false);
requestResponseFuture.setSendRequestOk(false);
requestResponseFuture.putResponseMessage(null);
requestResponseFuture.setCause(e);
}
......@@ -1395,7 +1395,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this.sendDefaultImpl(msg, CommunicationMode.ASYNC, new SendCallback() {
@Override
public void onSuccess(SendResult sendResult) {
requestResponseFuture.setSendReqeustOk(true);
requestResponseFuture.setSendRequestOk(true);
}
@Override
......@@ -1421,12 +1421,12 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this.sendSelectImpl(msg, selector, arg, CommunicationMode.ASYNC, new SendCallback() {
@Override
public void onSuccess(SendResult sendResult) {
requestResponseFuture.setSendReqeustOk(true);
requestResponseFuture.setSendRequestOk(true);
}
@Override
public void onException(Throwable e) {
requestResponseFuture.setSendReqeustOk(false);
requestResponseFuture.setSendRequestOk(false);
requestResponseFuture.putResponseMessage(null);
requestResponseFuture.setCause(e);
}
......@@ -1461,7 +1461,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this.sendSelectImpl(msg, selector, arg, CommunicationMode.ASYNC, new SendCallback() {
@Override
public void onSuccess(SendResult sendResult) {
requestResponseFuture.setSendReqeustOk(true);
requestResponseFuture.setSendRequestOk(true);
}
@Override
......@@ -1487,12 +1487,12 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this.sendKernelImpl(msg, mq, CommunicationMode.ASYNC, new SendCallback() {
@Override
public void onSuccess(SendResult sendResult) {
requestResponseFuture.setSendReqeustOk(true);
requestResponseFuture.setSendRequestOk(true);
}
@Override
public void onException(Throwable e) {
requestResponseFuture.setSendReqeustOk(false);
requestResponseFuture.setSendRequestOk(false);
requestResponseFuture.putResponseMessage(null);
requestResponseFuture.setCause(e);
}
......@@ -1526,7 +1526,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this.sendKernelImpl(msg, mq, CommunicationMode.ASYNC, new SendCallback() {
@Override
public void onSuccess(SendResult sendResult) {
requestResponseFuture.setSendReqeustOk(true);
requestResponseFuture.setSendRequestOk(true);
}
@Override
......@@ -1540,7 +1540,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
private void requestFail(final String correlationId) {
RequestResponseFuture responseFuture = RequestFutureTable.getRequestFutureTable().remove(correlationId);
if (responseFuture != null) {
responseFuture.setSendReqeustOk(false);
responseFuture.setSendRequestOk(false);
responseFuture.putResponseMessage(null);
try {
responseFuture.executeRequestCallback();
......
......@@ -103,8 +103,8 @@ public class RequestResponseFuture {
return sendRequestOk;
}
public void setSendReqeustOk(boolean sendReqeustOk) {
this.sendRequestOk = sendReqeustOk;
public void setSendRequestOk(boolean sendRequestOk) {
this.sendRequestOk = sendRequestOk;
}
public Message getRequestMsg() {
......
......@@ -373,7 +373,7 @@ public class DefaultMQProducerTest {
assertThat(responseMap).isNotNull();
for (Map.Entry<String, RequestResponseFuture> entry : responseMap.entrySet()) {
RequestResponseFuture future = entry.getValue();
future.setSendReqeustOk(true);
future.setSendRequestOk(true);
message.setFlag(1);
future.getRequestCallback().onSuccess(message);
}
......
......@@ -37,7 +37,7 @@ public class RequestResponseFutureTest {
@Override public void onException(Throwable e) {
}
});
future.setSendReqeustOk(true);
future.setSendRequestOk(true);
future.executeRequestCallback();
assertThat(cc.get()).isEqualTo(1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册