public TCPClientBuilder bufSizeKB(int bufSizeKB) { netParams.bufSizeKB(bufSizeKB); return this; }
public ServerBuilder bufSizeKB(int bufSizeKB) { netParams.bufSizeKB(bufSizeKB); return this; }
public ExtendedWorker(String name, RapidoidHelper helper, NetworkingParams net, SSLContext sslContext) { super(name); this.bufSize = net.bufSizeKB() * 1024; this.noDelay = net.noDelay(); this.bufs = new BufGroup(bufSize, net.syncBufs()); this.bufSizeLimit = 1024L * Conf.NET.entry("bufSizeLimit").or(1024); // in KB this.serverProtocol = net.protocol(); this.helper = helper; this.sslContext = sslContext; this.maxPipeline = net.maxPipeline(); final int queueSize = ConfigUtil.micro() ? 1000 : 1000000; final int growFactor = ConfigUtil.micro() ? 2 : 10; this.restarting = new ArrayBlockingQueue<>(queueSize); this.connecting = new ArrayBlockingQueue<>(queueSize); this.connected = new ArrayBlockingQueue<>(queueSize); this.done = new SimpleList<>(queueSize / 10, growFactor); this.dataIn = Insights.stats(name + ":datain"); this.dataOut = Insights.stats(name + ":dataout"); connections = Pools.create("connections", () -> newConnection(false), 100000); if (idleConnectionsCrawler != null) { idleConnectionsCrawler.register(allConnections); } }
public RapidoidWorker(String name, final RapidoidHelper helper, NetworkingParams net, SSLContext sslContext) { super(name); this.bufSize = net.bufSizeKB() * 1024; this.noDelay = net.noDelay(); this.bufs = new BufGroup(bufSize, net.syncBufs()); this.serverProtocol = net.protocol(); this.helper = helper; this.sslContext = sslContext; this.maxPipeline = net.maxPipeline(); final int queueSize = ConfigUtil.micro() ? 1000 : 1000000; final int growFactor = ConfigUtil.micro() ? 2 : 10; this.connected = new ArrayBlockingQueue<>(queueSize); this.done = new SimpleList<>(queueSize / 10, growFactor); connections = Pools.create("connections", () -> newConnection(false), 100000); if (idleConnectionsCrawler != null) { idleConnectionsCrawler.register(allConnections); } }