From e8766c4ba6f40dec8f5b03392ac4881dad757d24 Mon Sep 17 00:00:00 2001 From: Jeff Griffith Date: Mon, 21 Nov 2011 16:08:11 -0500 Subject: [PATCH] Added default num bosses const. --- .../channel/socket/nio/NioClientSocketPipelineSink.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java index 1688d8ece7..47b43098ce 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java @@ -58,8 +58,9 @@ class NioClientSocketPipelineSink extends AbstractChannelSink { static final InternalLogger logger = InternalLoggerFactory.getInstance(NioClientSocketPipelineSink.class); + private static final int DEFAULT_BOSS_COUNT = 1; final Executor bossExecutor; - private int numBosses = 1; + private final int numBosses; private final Boss bosses[]; private final NioWorker[] workers; @@ -67,7 +68,7 @@ class NioClientSocketPipelineSink extends AbstractChannelSink { private final AtomicInteger workerIndex = new AtomicInteger(); NioClientSocketPipelineSink(Executor bossExecutor, Executor workerExecutor, int workerCount) { - this(bossExecutor, workerExecutor, 1, workerCount); + this(bossExecutor, workerExecutor, DEFAULT_BOSS_COUNT, workerCount); } NioClientSocketPipelineSink(Executor bossExecutor, Executor workerExecutor, int bossCount, int workerCount) {