|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.runtime.ParaTask
public class ParaTask
Helper methods for the ParaTask runtime. This class contains various functions to set up the ParaTask runtime, etc.
All applications making use of the ParaTask features should invoke init()
early in the main
method. This will initialise various aspects of the ParaTask runtime.
Nested Class Summary | |
---|---|
static class |
ParaTask.ScheduleType
Enum representing the possible schedules that ParaTask supports. |
static class |
ParaTask.ThreadPoolType
Enum representing the possible thread pool types that ParaTask supports. |
Method Summary | |
---|---|
static int |
activeInteractiveTaskCount()
Returns a count of the number of active interactive tasks. |
static java.util.ArrayList<TaskID> |
allTasksInGroup(TaskIDGroup group)
A recursive convenience function that digs into the TaskIDGroup and returns all the individual TaskIDs. |
static java.util.ArrayList<TaskID> |
allTasksInList(java.util.ArrayList<TaskID> list)
Flattens a list of TaskIDs. |
static int |
getActiveCount(ParaTask.ThreadPoolType threadPoolType)
|
static java.lang.Thread |
getEDT()
|
static ParaTask.ScheduleType |
getScheduleType()
Returns the schedule being used in the runtime. |
static int |
getThreadPoolSize(ParaTask.ThreadPoolType threadPoolType)
Returns the size of the thread pool. |
static void |
init()
To be executed by the main thread (i.e. |
static void |
setScheduling(ParaTask.ScheduleType type)
Set the scheduling scheme. |
static void |
setThreadPoolSize(ParaTask.ThreadPoolType threadPoolType,
int size)
Set the size of the thread pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.Thread getEDT()
public static void setThreadPoolSize(ParaTask.ThreadPoolType threadPoolType, int size)
size
- public static void setScheduling(ParaTask.ScheduleType type)
type
- The schedule to use.public static ParaTask.ScheduleType getScheduleType()
public static int getThreadPoolSize(ParaTask.ThreadPoolType threadPoolType)
public static int getActiveCount(ParaTask.ThreadPoolType threadPoolType)
public static int activeInteractiveTaskCount()
public static void init()
main
method). Registers the main thread and event
dispatch thread with ParaTask, as well as other ParaTask runtime settings.
public static java.util.ArrayList<TaskID> allTasksInList(java.util.ArrayList<TaskID> list)
list
- Input list of TaskIDs (with potentially some TaskIDGroups)
allTasksInGroup(TaskIDGroup)
public static java.util.ArrayList<TaskID> allTasksInGroup(TaskIDGroup group)
group
placed inside a new ArrayListallTasksInList(ArrayList)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |