From d96b633b5f1048ca6ef9b032d956b0be77a11e66 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Wed, 3 Sep 2008 07:49:59 +0000 Subject: [PATCH] * Added missing constructor JavaDoc * Fixed description of workerCount parameter --- .../nio/NioClientSocketChannelFactory.java | 2 +- .../nio/NioServerSocketChannelFactory.java | 21 +++++++++++++++++++ .../oio/OioClientSocketChannelFactory.java | 6 ++++++ .../oio/OioServerSocketChannelFactory.java | 8 +++++++ 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java index 989988c09f..fc83356b51 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java @@ -120,7 +120,7 @@ public class NioClientSocketChannelFactory implements ClientSocketChannelFactory * @param workerExecutor * the {@link Executor} which will execute the I/O worker threads * @param workerCount - * the number of I/O worker threads to start + * the maximum number of I/O worker threads */ public NioClientSocketChannelFactory( Executor bossExecutor, Executor workerExecutor, diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java index dca78e133a..c8b26d90f3 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java @@ -100,11 +100,32 @@ public class NioServerSocketChannelFactory implements ServerSocketChannelFactory final Executor bossExecutor; private final ChannelSink sink; + /** + * Creates a new instance. Calling this constructor is same with calling + * {@link #NioServerSocketChannelFactory(Executor, Executor, int)} with + * the number of available processors in the machine. The number of + * available processors is calculated by {@link Runtime#availableProcessors()}. + * + * @param bossExecutor + * the {@link Executor} which will execute the boss threads + * @param workerExecutor + * the {@link Executor} which will execute the I/O worker threads + */ public NioServerSocketChannelFactory( Executor bossExecutor, Executor workerExecutor) { this(bossExecutor, workerExecutor, Runtime.getRuntime().availableProcessors()); } + /** + * Creates a new instance. + * + * @param bossExecutor + * the {@link Executor} which will execute the boss threads + * @param workerExecutor + * the {@link Executor} which will execute the I/O worker threads + * @param workerCount + * the maximum number of I/O worker threads + */ public NioServerSocketChannelFactory( Executor bossExecutor, Executor workerExecutor, int workerCount) { diff --git a/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java index b0e2177ad3..0dd20d2811 100644 --- a/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java @@ -88,6 +88,12 @@ public class OioClientSocketChannelFactory implements ClientSocketChannelFactory final OioClientSocketPipelineSink sink; + /** + * Creates a new instance. + * + * @param workerExecutor + * the {@link Executor} which will execute the I/O worker threads + */ public OioClientSocketChannelFactory(Executor workerExecutor) { if (workerExecutor == null) { throw new NullPointerException("workerExecutor"); diff --git a/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java index 1158d73019..09092eccd9 100644 --- a/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java @@ -101,6 +101,14 @@ public class OioServerSocketChannelFactory implements ServerSocketChannelFactory final Executor bossExecutor; private final ChannelSink sink; + /** + * Creates a new instance. + * + * @param bossExecutor + * the {@link Executor} which will execute the boss threads + * @param workerExecutor + * the {@link Executor} which will execute the I/O worker threads + */ public OioServerSocketChannelFactory( Executor bossExecutor, Executor workerExecutor) { if (bossExecutor == null) {