public NetConfig(final NetConfig other) { this.timeoutMilliSec = other.getTimeoutMilliSec(); this.reuseAddr = other.getReuseAddr(); this.keepAlive = other.getKeepAlive(); this.tcpNoDelay = other.getTcpNoDelay(); this.linger = other.getLinger(); this.bindBacklogSize = other.getBindBacklogSize(); this.interestOpQueued = other.getInterestOpQueued(); this.rcvBuf = new SizeInBytes(other.getRcvBuf()); this.sndBuf = new SizeInBytes(other.getSndBuf()); this.ioRatio = other.getIoRatio(); this.transport = other.getTransport(); this.ssl = other.getSsl(); this.httpConfig = new HttpConfig(other.getHttpConfig()); this.nodeConfig = new NodeConfig(other.getNodeConfig()); } }
sslFlag = netConfig.getSsl(); if (sslFlag) { Loggers.MSG.info("{}: SSL/TLS is enabled", jobName); final int sto = netConfig.getTimeoutMilliSec(); if (sto > 0) { this.socketTimeout = sto; final NodeConfig nodeConfig = netConfig.getNodeConfig(); storageNodePort = nodeConfig.getPort(); connAttemptsLimit = nodeConfig.getConnAttemptsLimit(); final int ioRatio = netConfig.getIoRatio(); final Transport transportKey = Transport.valueOf(netConfig.getTransport().toUpperCase()); bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, netConfig.getTimeoutMilliSec()); bootstrap.option(ChannelOption.WRITE_SPIN_COUNT, 1); int size = (int) netConfig.getRcvBuf().get(); if (size > 0) { bootstrap.option(ChannelOption.SO_RCVBUF, size); size = (int) netConfig.getSndBuf().get(); if (size > 0) { bootstrap.option(ChannelOption.SO_SNDBUF, size); bootstrap.option(ChannelOption.SO_KEEPALIVE, netConfig.getKeepAlive()); bootstrap.option(ChannelOption.SO_LINGER, netConfig.getLinger()); bootstrap.option(ChannelOption.SO_REUSEADDR, netConfig.getReuseAddr()); bootstrap.option(ChannelOption.TCP_NODELAY, netConfig.getTcpNoDelay());