@Override public void operationComplete(Future future) throws Exception { once.release(); if (!future.isSuccess()) { LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } } });
@Override public void operationComplete(Future future) throws Exception { once.release(); if (!future.isSuccess()) { LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } } });
@Override public void encode(ChannelHandlerContext ctx, RemotingCommand remotingCommand, ByteBuf out) throws Exception { if (remotingCommand == null) { LOGGER.error("Message is null"); return; } try { ByteBuffer byteBuffer = codec.encode(remotingCommand); out.writeBytes(byteBuffer); } catch (Exception e) { Channel channel = new NettyChannel(ctx); LOGGER.error("encode exception, addr={}, remotingCommand={}", RemotingHelper.parseChannelRemoteAddr(channel), remotingCommand.toString(), e); RemotingHelper.closeChannel(channel); } } }
@Override public void encode(ChannelHandlerContext ctx, RemotingCommand remotingCommand, ByteBuf out) throws Exception { if (remotingCommand == null) { LOGGER.error("Message is null"); return; } try { ByteBuffer byteBuffer = codec.encode(remotingCommand); out.writeBytes(byteBuffer); } catch (Exception e) { Channel channel = new NettyChannel(ctx); LOGGER.error("encode exception, addr={}, remotingCommand={}", RemotingHelper.parseChannelRemoteAddr(channel), remotingCommand.toString(), e); RemotingHelper.closeChannel(channel); } } }
@Override public ByteBuffer encode(NioChannel channel, Object msg) { if (msg == null) { LOGGER.error("Message is null"); return null; } if (msg instanceof RemotingCommand) { try { return codec.encode((RemotingCommand) msg); } catch (Exception e) { Channel c = new LtsChannel(channel); LOGGER.error("encode exception, addr={}, remotingCommand={}", RemotingHelper.parseChannelRemoteAddr(c), ((RemotingCommand) msg).toString(), e); RemotingHelper.closeChannel(c); } } else { LOGGER.error("Message is not instance of " + RemotingCommand.class.getName()); } return null; } }
@Override public ByteBuffer encode(NioChannel channel, Object msg) { if (msg == null) { LOGGER.error("Message is null"); return null; } if (msg instanceof RemotingCommand) { try { return codec.encode((RemotingCommand) msg); } catch (Exception e) { Channel c = new LtsChannel(channel); LOGGER.error("encode exception, addr={}, remotingCommand={}", RemotingHelper.parseChannelRemoteAddr(c), ((RemotingCommand) msg).toString(), e); RemotingHelper.closeChannel(c); } } else { LOGGER.error("Message is not instance of " + RemotingCommand.class.getName()); } return null; } }
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseTable.remove(request.getOpaque()); responseFuture.setCause(future.cause()); responseFuture.putResponse(null); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseTable.remove(request.getOpaque()); responseFuture.setCause(future.cause()); responseFuture.putResponse(null); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseFuture.putResponse(null); try { responseFuture.executeInvokeCallback(); } finally { responseFuture.release(); } responseTable.remove(request.getOpaque()); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
@Override public void operationComplete(Future future) throws Exception { if (future.isSuccess()) { responseFuture.setSendRequestOK(true); return; } else { responseFuture.setSendRequestOK(false); } responseFuture.putResponse(null); try { responseFuture.executeInvokeCallback(); } finally { responseFuture.release(); } responseTable.remove(request.getOpaque()); LOGGER.warn("send a request command to channel <" + channel.remoteAddress() + "> failed."); LOGGER.warn(request.toString()); } });
LOGGER.warn("receive response, but not matched any request, " + RemotingHelper.parseChannelRemoteAddr(channel)); LOGGER.warn(cmd.toString());
LOGGER.warn("receive response, but not matched any request, " + RemotingHelper.parseChannelRemoteAddr(channel)); LOGGER.warn(cmd.toString());
@Override public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception { if (message == null) { LOGGER.error("Message is null"); return; } if (!(message instanceof RemotingCommand)) { LOGGER.error("{} is not instanceof RemotingCommand", message); return; } RemotingCommand remotingCommand = (RemotingCommand) message; try { ByteBuffer byteBuffer = codec.encode(remotingCommand); IoBuffer ioBuffer = bufferAllocator.wrap(byteBuffer); out.write(ioBuffer); out.flush(); } catch (Exception e) { Channel channel = new MinaChannel(session); LOGGER.error("encode exception, addr={}, remotingCommand={}", RemotingHelper.parseChannelRemoteAddr(channel), remotingCommand.toString(), e); RemotingHelper.closeChannel(channel); } } };
@Override public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception { if (message == null) { LOGGER.error("Message is null"); return; } if (!(message instanceof RemotingCommand)) { LOGGER.error("{} is not instanceof RemotingCommand", message); return; } RemotingCommand remotingCommand = (RemotingCommand) message; try { ByteBuffer byteBuffer = codec.encode(remotingCommand); IoBuffer ioBuffer = bufferAllocator.wrap(byteBuffer); out.write(ioBuffer); out.flush(); } catch (Exception e) { Channel channel = new MinaChannel(session); LOGGER.error("encode exception, addr={}, remotingCommand={}", RemotingHelper.parseChannelRemoteAddr(channel), remotingCommand.toString(), e); RemotingHelper.closeChannel(channel); } } };
LOGGER.warn("invokeAsyncImpl tryAcquire semaphore timeout, " + timeoutMillis + " waiting thread nums: " + this.semaphoreAsync.getQueueLength()); LOGGER.warn(request.toString());
LOGGER.warn("invokeAsyncImpl tryAcquire semaphore timeout, " + timeoutMillis + " waiting thread nums: " + this.semaphoreAsync.getQueueLength()); LOGGER.warn(request.toString());
LOGGER.warn("invokeOnewayImpl tryAcquire semaphore timeout, " + timeoutMillis + " waiting thread nums: " + this.semaphoreOneway.getQueueLength()); LOGGER.warn(request.toString());
LOGGER.warn("invokeOnewayImpl tryAcquire semaphore timeout, " + timeoutMillis + " waiting thread nums: " + this.semaphoreOneway.getQueueLength()); LOGGER.warn(request.toString());