@Override public void invokeOneway(Channel channel, RemotingCommand request, long timeoutMillis) throws InterruptedException, RemotingTooMuchRequestException, RemotingTimeoutException, RemotingSendRequestException { this.invokeOnewayImpl(channel, request, timeoutMillis); }
@Override public RemotingCommand invokeSync(final Channel channel, final RemotingCommand request, final long timeoutMillis) throws InterruptedException, RemotingSendRequestException, RemotingTimeoutException { return this.invokeSyncImpl(channel, request, timeoutMillis); }
@Override public void invokeAsync(Channel channel, RemotingCommand request, long timeoutMillis, AsyncCallback asyncCallback) throws InterruptedException, RemotingTooMuchRequestException, RemotingTimeoutException, RemotingSendRequestException { this.invokeAsyncImpl(channel, request, timeoutMillis, asyncCallback); }
public static void closeChannel(Channel channel) { final String addrRemote = RemotingHelper.parseChannelRemoteAddr(channel); channel.close().addListener(new ChannelHandlerListener() { @Override public void operationComplete(Future future) throws Exception { LOGGER.info("closeChannel: close the connection to remote address[{}] result: {}", addrRemote, future.isSuccess()); } }); }
private Channel getAndCreateChannel(final String addr) throws InterruptedException { ChannelWrapper cw = this.channelTables.get(addr); if (cw != null && cw.isConnected()) { return cw.getChannel(); } return this.createChannel(addr); }
@Override public void operationComplete(Future future) throws Exception { listener.operationComplete(future); } });
public void registerProcessor(int requestCode, RemotingProcessor processor, ExecutorService executor) { remotingServer.registerProcessor(requestCode, processor, executor); }
public void shutdown() { remotingServer.shutdown(); } }
public void registerProcessor(int requestCode, RemotingProcessor processor, ExecutorService executor) { remotingClient.registerProcessor(requestCode, processor, executor); }
public void registerDefaultProcessor(RemotingProcessor processor, ExecutorService executor) { remotingServer.registerDefaultProcessor(processor, executor); }
public void registerDefaultProcessor(RemotingProcessor processor, ExecutorService executor) { remotingClient.registerDefaultProcessor(processor, executor); }
public static void closeChannel(Channel channel) { final String addrRemote = RemotingHelper.parseChannelRemoteAddr(channel); channel.close().addListener(new ChannelHandlerListener() { @Override public void operationComplete(Future future) throws Exception { LOGGER.info("closeChannel: close the connection to remote address[{}] result: {}", addrRemote, future.isSuccess()); } }); }
private Channel getAndCreateChannel(final String addr) throws InterruptedException { ChannelWrapper cw = this.channelTables.get(addr); if (cw != null && cw.isConnected()) { return cw.getChannel(); } return this.createChannel(addr); }
@Override public void invokeOneway(Channel channel, RemotingCommand request, long timeoutMillis) throws InterruptedException, RemotingTooMuchRequestException, RemotingTimeoutException, RemotingSendRequestException { this.invokeOnewayImpl(channel, request, timeoutMillis); }
@Override public RemotingCommand invokeSync(final Channel channel, final RemotingCommand request, final long timeoutMillis) throws InterruptedException, RemotingSendRequestException, RemotingTimeoutException { return this.invokeSyncImpl(channel, request, timeoutMillis); }
@Override public void invokeAsync(Channel channel, RemotingCommand request, long timeoutMillis, AsyncCallback asyncCallback) throws InterruptedException, RemotingTooMuchRequestException, RemotingTimeoutException, RemotingSendRequestException { this.invokeAsyncImpl(channel, request, timeoutMillis, asyncCallback); }
@Override public void operationComplete(Future future) throws Exception { listener.operationComplete(future); } });
public void registerProcessor(int requestCode, RemotingProcessor processor, ExecutorService executor) { remotingServer.registerProcessor(requestCode, processor, executor); }
public void shutdown() { remotingServer.shutdown(); } }
public void registerProcessor(int requestCode, RemotingProcessor processor, ExecutorService executor) { remotingClient.registerProcessor(requestCode, processor, executor); }