public class DefaultThreadPool
extends java.lang.Object
| Constructor and Description |
|---|
DefaultThreadPool(int poolSize,
boolean syncThreads)
Create a new pool.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the pool i.e, stop pooling threads.
|
void |
configure(int poolSize)
Configure a new pool size.
|
void |
executeTask(java.lang.Runnable task)
Execute the task in a free thread or create a new one.
|
int |
getPoolSize()
Returns current pool size.
|
public DefaultThreadPool(int poolSize,
boolean syncThreads)
public void configure(int poolSize)
public int getPoolSize()
public void close()
public void executeTask(java.lang.Runnable task)
task - The task to executeCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.