public class NettyRemotingClient extends NettyRemotingAbstract implements RemotingClient
defaultRequestProcessor, nettyEventExecuter, processorTable, responseTable, semaphoreAsync, semaphoreOneway| 构造器和说明 |
|---|
NettyRemotingClient(NettyClientConfig nettyClientConfig) |
NettyRemotingClient(NettyClientConfig nettyClientConfig,
ChannelEventListener channelEventListener) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
closeChannel(io.netty.channel.Channel channel) |
void |
closeChannel(String addr,
io.netty.channel.Channel channel) |
io.netty.channel.Channel |
getAndCreateChannel(String addr) |
ExecutorService |
getCallbackExecutor() |
ChannelEventListener |
getChannelEventListener() |
List<String> |
getNameServerAddressList() |
List<String> |
getNamesrvAddrList() |
RPCHook |
getRpcHook() |
RPCHook |
getRPCHook() |
void |
invokeAsync(String addr,
RemotingCommand request,
long timeoutMillis,
InvokeCallback invokeCallback) |
void |
invokeOneway(String addr,
RemotingCommand request,
long timeoutMillis) |
RemotingCommand |
invokeSync(String addr,
RemotingCommand request,
long timeoutMillis) |
void |
registerProcessor(int requestCode,
NettyRequestProcessor processor,
ExecutorService executor) |
void |
registerRPCHook(RPCHook rpcHook) |
void |
shutdown() |
void |
start() |
void |
updateNameServerAddressList(List<String> addrs) |
invokeAsyncImpl, invokeOnewayImpl, invokeSyncImpl, processMessageReceived, processRequestCommand, processResponseCommand, putNettyEvent, scanResponseTablepublic NettyRemotingClient(NettyClientConfig nettyClientConfig)
public NettyRemotingClient(NettyClientConfig nettyClientConfig, ChannelEventListener channelEventListener)
public void start()
start 在接口中 RemotingServicepublic void shutdown()
shutdown 在接口中 RemotingServicepublic io.netty.channel.Channel getAndCreateChannel(String addr) throws InterruptedException
public void closeChannel(String addr, io.netty.channel.Channel channel)
public void closeChannel(io.netty.channel.Channel channel)
public void registerProcessor(int requestCode,
NettyRequestProcessor processor,
ExecutorService executor)
registerProcessor 在接口中 RemotingClientpublic RemotingCommand invokeSync(String addr, RemotingCommand request, long timeoutMillis) throws InterruptedException, RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException
public void invokeAsync(String addr, RemotingCommand request, long timeoutMillis, InvokeCallback invokeCallback) throws InterruptedException, RemotingConnectException, RemotingTooMuchRequestException, RemotingTimeoutException, RemotingSendRequestException
public void invokeOneway(String addr, RemotingCommand request, long timeoutMillis) throws InterruptedException, RemotingConnectException, RemotingTooMuchRequestException, RemotingTimeoutException, RemotingSendRequestException
public ExecutorService getCallbackExecutor()
getCallbackExecutor 在类中 NettyRemotingAbstractpublic void updateNameServerAddressList(List<String> addrs)
updateNameServerAddressList 在接口中 RemotingClientpublic ChannelEventListener getChannelEventListener()
public List<String> getNameServerAddressList()
getNameServerAddressList 在接口中 RemotingClientpublic RPCHook getRpcHook()
public void registerRPCHook(RPCHook rpcHook)
registerRPCHook 在接口中 RemotingServicepublic RPCHook getRPCHook()
getRPCHook 在类中 NettyRemotingAbstractCopyright © 2018. All rights reserved.