* Added missing constructor JavaDoc

* Fixed description of workerCount parameter
This commit is contained in:
Trustin Lee 2008-09-03 07:49:59 +00:00
parent 101124f8b8
commit d96b633b5f
4 changed files with 36 additions and 1 deletions

View File

@ -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,

View File

@ -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) {

View File

@ -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");

View File

@ -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) {