public AbstractNettyChannel newChannel() throws InterruptedException {
        ChannelFuture channelFuture = bootstrap.connect(remoteAddress).sync();
        Channel channel = channelFuture.channel();
        return this.callBack == null ? new SyncNettyChannel(this, channel) : new AsyncNettyChannel(this, channel);
    }
public AbstractNettyChannel newChannel() throws InterruptedException {
        ChannelFuture channelFuture = bootstrap.connect(remoteAddress).sync();
        Channel channel = channelFuture.channel();
        return this.callBack == null ? new SyncNettyChannel(this, channel) : new AsyncNettyChannel(this, channel);
    }
public AbstractNettyChannel newChannel ( ) throws InterruptedException { ChannelFuture channelFuture = bootstrap . connect ( remoteAddress ) . sync ( ) ; Channel channel = channelFuture . channel ( ) ; return this . callBack == null ? new SyncNettyChannel ( this , channel ) : new AsyncNettyChannel ( this , channel ) ; }
只有单线程执行该方法，不用加同步
只有单线程执行该方法，不用加同步