public class ActiveExecutor
extends java.lang.Object
inputBufferSize).outputBulkSize).| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOGGER |
| Constructor and Description |
|---|
ActiveExecutor(java.lang.String description,
int nbThreads,
int inputBufferSize,
int queueCapacity,
int outputBulkSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(java.lang.Runnable task)
Add a task.
|
void |
flush()
Flush the per provider queue.
|
void |
join()
Wait until all the consumer threads are actually stopped.
|
void |
start()
Start the consumer threads.
|
void |
stop(boolean kill)
Stop the consumer threads.
|
public ActiveExecutor(java.lang.String description,
int nbThreads,
int inputBufferSize,
int queueCapacity,
int outputBulkSize)
public void start()
public void stop(boolean kill)
throws java.lang.InterruptedException
flush().kill - If true, cancel the currently scheduled tasks.java.lang.InterruptedExceptionpublic void join()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void addTask(java.lang.Runnable task)
throws java.lang.InterruptedException
inputBufferSize>1, Make sure this thread calls
flush() when you are done adding tasks.java.lang.InterruptedExceptionpublic void flush()
throws java.lang.InterruptedException
inputBufferSize>1.java.lang.InterruptedException