| Constructor and Description |
|---|
Executer(int capacity, int threadNumber)
Create a new executer with a blocking queue of size capacity and threadNumber threads in the thread-pool for execution.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel the execution.
|
void |
finish()
after a call of this, all threads are going to finish after their execution.
|
void |
join()
Join on finished all tasks.
|
void |
pauseOrResume()
Pause / Resume the execution
|
void |
queue(Runnable
|
void |
run()
|
public Executer(int capacity,
int threadNumber)
capacity - the number of places in the queue.
threadNumber - the number of threads to use in the thread-pool.
public void queue(Runnabletask)
task - the task to queue
public void finish()
public void cancel()
public void pauseOrResume()
public void join()
public void run()