|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object felix.society.Task
public abstract class Task
A concurrent task.
Nested Class Summary | |
---|---|
static class |
Task.TaskType
Type of task \in {TASKSET, TASKLIST, TASK} |
Field Summary | |
---|---|
java.util.concurrent.Future |
currentFuture
What future is currently running (used for join). |
Worker |
currentWorker
What worker is currently running? |
static java.util.concurrent.ExecutorService |
softpool
A thread poll that only contains very very cheap threads (to support TaskSet > TaskList1, TaskList2 structure) |
Constructor Summary | |
---|---|
Task(Task.TaskType _type)
The constructor. |
|
Task(Task.TaskType _type,
java.lang.Integer _nRuns)
|
Method Summary | |
---|---|
void |
addSubTask(Task _task)
|
void |
execute(java.util.concurrent.ExecutorService pool)
Execute this task. |
abstract Worker |
generateWorker()
Generate worker for TASK (threads). |
abstract Worker |
generateWorker(java.util.concurrent.ExecutorService pool)
Generate worker for TASKLIST, TASKSET (threads). |
Task.TaskType |
getType()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.concurrent.ExecutorService softpool
public Worker currentWorker
public java.util.concurrent.Future currentFuture
Constructor Detail |
---|
public Task(Task.TaskType _type)
_type
- public Task(Task.TaskType _type, java.lang.Integer _nRuns)
Method Detail |
---|
public Task.TaskType getType()
public void addSubTask(Task _task)
public void execute(java.util.concurrent.ExecutorService pool) throws java.lang.Exception
pool
- The thread pool
java.lang.Exception
public abstract Worker generateWorker()
public abstract Worker generateWorker(java.util.concurrent.ExecutorService pool)
pool
- The thread pool in which subtasks will run.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |