public abstract class IThreadPool
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
NUM_THREADS |
Constructor and Description |
---|
IThreadPool() |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(PTask item)
add a task to the pool
|
abstract void |
add(PTask item,
int threadId)
add a task to the pool
|
abstract int |
getPoolSize() |
abstract void |
join()
wait for termination
|
abstract void |
shutdown()
shutdown the thread pool
|
abstract void |
sleep()
Set thread pool to state sleep.
|
abstract void |
start()
start the thread pool
|
abstract void |
trigger()
trigger workers (used for the synchronization)
|
abstract void |
weakUp()
Wake up the thread pool.
|
public abstract void start()
public abstract void shutdown() throws java.lang.InterruptedException
java.lang.InterruptedException
public abstract void join() throws java.lang.InterruptedException
java.lang.InterruptedException
public abstract void sleep()
public abstract void weakUp()
public abstract void trigger()
public abstract void add(PTask item)
item
- public abstract void add(PTask item, int threadId)
item
- public abstract int getPoolSize()