public abstract class NettyRemotingAbstract extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected Pair<NettyRequestProcessor,ExecutorService> |
defaultRequestProcessor |
protected com.alibaba.rocketmq.remoting.netty.NettyRemotingAbstract.NettyEventExecuter |
nettyEventExecuter |
protected HashMap<Integer,Pair<NettyRequestProcessor,ExecutorService>> |
processorTable |
protected ConcurrentHashMap<Integer,ResponseFuture> |
responseTable |
protected Semaphore |
semaphoreAsync |
protected Semaphore |
semaphoreOneway |
| 构造器和说明 |
|---|
NettyRemotingAbstract(int permitsOneway,
int permitsAsync) |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract ExecutorService |
getCallbackExecutor() |
abstract ChannelEventListener |
getChannelEventListener() |
abstract RPCHook |
getRPCHook() |
void |
invokeAsyncImpl(io.netty.channel.Channel channel,
RemotingCommand request,
long timeoutMillis,
InvokeCallback invokeCallback) |
void |
invokeOnewayImpl(io.netty.channel.Channel channel,
RemotingCommand request,
long timeoutMillis) |
RemotingCommand |
invokeSyncImpl(io.netty.channel.Channel channel,
RemotingCommand request,
long timeoutMillis) |
void |
processMessageReceived(io.netty.channel.ChannelHandlerContext ctx,
RemotingCommand msg) |
void |
processRequestCommand(io.netty.channel.ChannelHandlerContext ctx,
RemotingCommand cmd) |
void |
processResponseCommand(io.netty.channel.ChannelHandlerContext ctx,
RemotingCommand cmd) |
void |
putNettyEvent(NettyEvent event) |
void |
scanResponseTable() |
protected final Semaphore semaphoreOneway
protected final Semaphore semaphoreAsync
protected final ConcurrentHashMap<Integer,ResponseFuture> responseTable
protected final HashMap<Integer,Pair<NettyRequestProcessor,ExecutorService>> processorTable
protected final com.alibaba.rocketmq.remoting.netty.NettyRemotingAbstract.NettyEventExecuter nettyEventExecuter
protected Pair<NettyRequestProcessor,ExecutorService> defaultRequestProcessor
public abstract ChannelEventListener getChannelEventListener()
public void putNettyEvent(NettyEvent event)
public void processMessageReceived(io.netty.channel.ChannelHandlerContext ctx,
RemotingCommand msg)
throws Exception
Exceptionpublic void processRequestCommand(io.netty.channel.ChannelHandlerContext ctx,
RemotingCommand cmd)
public void processResponseCommand(io.netty.channel.ChannelHandlerContext ctx,
RemotingCommand cmd)
public abstract RPCHook getRPCHook()
public abstract ExecutorService getCallbackExecutor()
public void scanResponseTable()
public RemotingCommand invokeSyncImpl(io.netty.channel.Channel channel, RemotingCommand request, long timeoutMillis) throws InterruptedException, RemotingSendRequestException, RemotingTimeoutException
public void invokeAsyncImpl(io.netty.channel.Channel channel,
RemotingCommand request,
long timeoutMillis,
InvokeCallback invokeCallback)
throws InterruptedException,
RemotingTooMuchRequestException,
RemotingTimeoutException,
RemotingSendRequestException
public void invokeOnewayImpl(io.netty.channel.Channel channel,
RemotingCommand request,
long timeoutMillis)
throws InterruptedException,
RemotingTooMuchRequestException,
RemotingTimeoutException,
RemotingSendRequestException
Copyright © 2012–2016. All rights reserved.