提交 e4c0a4c4 编写于 作者: H huzongtang

polish and adjust codes for remoting module.

上级 f7c55b9f
snode:
countLimit: # flow control type, only requestCount & requestSize support
- flowControlResourceName: 310
flowControlGrade: 1
flowControlBehavior: 1
flowControlResourceCount: 500.00 #QPS
- flowControlResourceName: overall
flowControlGrade: 1
flowControlBehavior: 1
flowControlResourceCount: 10000.00 #QPS
sizeLimit:
- flowControlResourceName: 310
flowControlGrade: 1
flowControlBehavior: 1
flowControlResourceCount: 5.00 #KB/S
topicLimit:
\ No newline at end of file
......@@ -23,9 +23,8 @@ import org.apache.rocketmq.remoting.common.RemotingHelper;
import org.apache.rocketmq.remoting.protocol.RemotingCommand;
public class NettyChannelHandlerContextImpl implements RemotingChannel {
public static final String ROCKETMQ_REMOTING = "RocketmqRemoting";
private static final InternalLogger log = InternalLoggerFactory.getLogger(ROCKETMQ_REMOTING);
private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
private final ChannelHandlerContext channelHandlerContext;
......
......@@ -28,9 +28,7 @@ import org.apache.rocketmq.remoting.common.RemotingHelper;
import org.apache.rocketmq.remoting.protocol.RemotingCommand;
public class NettyChannelImpl implements RemotingChannel {
public static final String ROCKETMQ_REMOTING = "RocketmqRemoting";
private static final InternalLogger log = InternalLoggerFactory.getLogger(ROCKETMQ_REMOTING);
private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
private final Channel channel;
......
......@@ -176,7 +176,7 @@ public abstract class NettyRemotingAbstract {
processRequestCommand(remotingChannel, cmd);
break;
case RESPONSE_COMMAND:
processResponseCommand(ctx, cmd);
processResponseCommand(remotingChannel, cmd);
break;
default:
break;
......@@ -279,10 +279,13 @@ public abstract class NettyRemotingAbstract {
/**
* Process response from remote peer to the previous issued requests.
*
* @param ctx channel handler context.
* @param remotingChannel channel handler context.
* @param cmd response command instance.
*/
public void processResponseCommand(ChannelHandlerContext ctx, RemotingCommand cmd) {
public void processResponseCommand(final RemotingChannel remotingChannel, RemotingCommand cmd) {
NettyChannelHandlerContextImpl nettyChannelHandlerContext = (NettyChannelHandlerContextImpl) remotingChannel;
final ChannelHandlerContext ctx = nettyChannelHandlerContext.getChannelHandlerContext();
final int opaque = cmd.getOpaque();
final ResponseFuture responseFuture = responseTable.get(opaque);
if (responseFuture != null) {
......
......@@ -32,14 +32,6 @@ public class ServiceProvider {
*/
private static ClassLoader thisClassLoader;
/**
* JDK1.3+ <a href= "http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider" > 'Service Provider'
* specification</a>.
*/
public static final String TRANSACTION_SERVICE_ID = "META-INF/service/org.apache.rocketmq.broker.transaction.TransactionalMessageService";
public static final String TRANSACTION_LISTENER_ID = "META-INF/service/org.apache.rocketmq.broker.transaction.AbstractTransactionalMessageCheckListener";
static {
thisClassLoader = getClassLoader(ServiceProvider.class);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册