public class ThreadPoolImpl extends java.lang.Object implements ThreadPool
| Constructor and Description |
|---|
ThreadPoolImpl()
Constructor.
|
ThreadPoolImpl(boolean priorityActive)
Constructor
|
ThreadPoolImpl(boolean priorityActive,
int nThreads)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(AtomicTask task)
Adds a new task to the list
|
void |
cancelPool(TileListener listener)
Cancel the pool of threads and destroy the pool
|
void |
destroyPool()
Deprecated.
|
void |
emptyPool()
Cleans the input and output pool
|
java.util.LinkedList<AtomicTask> |
getInputTaskList()
Gets the list of input tasks
|
AtomicTask |
getNext()
Gets the next task in the list
|
TilePipe |
getTilePipe()
Gets the list of output tiles
|
void |
init() |
boolean |
isPoolValid()
Returns true if the pool is valid
|
public ThreadPoolImpl()
public ThreadPoolImpl(boolean priorityActive,
int nThreads)
priorityActive - true if the pool runs using priorities and false if doesn'tnThreads - Number of threads of this poolpublic ThreadPoolImpl(boolean priorityActive)
priorityActive - true if the pool runs using priorities and false if doesn'tpublic void init()
public void cancelPool(TileListener listener)
listener - public void emptyPool()
listener - public java.util.LinkedList<AtomicTask> getInputTaskList()
ThreadPoolgetInputTaskList in interface ThreadPoolpublic TilePipe getTilePipe()
ThreadPoolgetTilePipe in interface ThreadPoolpublic void destroyPool()
destroyPool in interface ThreadPoolpublic boolean isPoolValid()
public void addTask(AtomicTask task)
addTask in interface ThreadPooltask - public AtomicTask getNext()