|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.hpd.AllPTSet
class AllPTSet
AllPTSet holds all processes and their tasks and generates subsets for different types of sets.
Field Summary | |
---|---|
private CLI |
cli
|
private ProcTaskIDManager |
manager
|
static int |
TASK_STATE_HELD
|
static int |
TASK_STATE_RUNNABLE
|
static int |
TASK_STATE_RUNNING
|
static int |
TASK_STATE_STOPPED
|
Constructor Summary | |
---|---|
AllPTSet(CLI cli)
|
Method Summary | |
---|---|
private void |
addTasksFromRange(ArrayList taskSets,
TreeMap proctasks,
int[] range)
Add tasks to the "tasks" ArrayList, as specified in "range", which corresponds to a.b:c.d notation |
private void |
addTasksFromReg(ArrayList taskSets,
TreeMap proctasks,
int[] reg)
Add tasks to the "tasks" ArrayList, as specified in "reg", which corresponds to a:b.c:d notation |
boolean |
containsTask(int procid,
int taskid)
|
Proc |
getProc(int procID)
|
ProcTasks[] |
getSubset(ParseTreeNode[] parseTree)
Generate a subset of this set, based on the tree generated by set notation parser. |
ProcTasks[] |
getSubsetByExec(String execname)
|
ProcTasks[] |
getSubsetByState(int state)
|
Iterator |
getTaskData()
|
Iterator |
getTasks()
Return an iterator to a collection of all the tasks. |
void |
removeProc(int procId)
Remove a proc from the list |
String |
toString()
|
private int[] |
walkRangeTree(ParseTreeNode node)
Walks a tree that corresponds to a.b:c.d notation. |
private int[] |
walkRegTree(ParseTreeNode node)
Walks a tree that corresponds to a:b.c:d notation, where b and d are optional ranges. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TASK_STATE_RUNNING
public static final int TASK_STATE_STOPPED
public static final int TASK_STATE_RUNNABLE
public static final int TASK_STATE_HELD
private final ProcTaskIDManager manager
private final CLI cli
Constructor Detail |
---|
public AllPTSet(CLI cli)
Method Detail |
---|
public Proc getProc(int procID)
public boolean containsTask(int procid, int taskid)
containsTask
in interface PTSet
public Iterator getTasks()
getTasks
in interface PTSet
public Iterator getTaskData()
getTaskData
in interface PTSet
public void removeProc(int procId)
removeProc
in interface PTSet
public ProcTasks[] getSubset(ParseTreeNode[] parseTree)
parseTree
- tree generated by SetNotationParser
, which is
an array of ParseTreeNodespublic ProcTasks[] getSubsetByState(int state)
public ProcTasks[] getSubsetByExec(String execname)
public String toString()
toString
in class Object
private int[] walkRangeTree(ParseTreeNode node)
node
- on a non-recursive call this should be a root of type
ParseTreeNode.TYPE_RANGE
private int[] walkRegTree(ParseTreeNode node)
node
- on a non-recursive call this should be a root of type
ParseTreeNode.TYPE_REG
private void addTasksFromRange(ArrayList taskSets, TreeMap proctasks, int[] range)
taskSets
- array of arrays of tasksproctasks
- A treemap of Integer(procID) to ProcTasksreg
- an array of length 4 returned by walkRangeTreeprivate void addTasksFromReg(ArrayList taskSets, TreeMap proctasks, int[] reg)
taskSets
- array of arrays of tasksproctasks
- TreeMap of ProcTasks to put Procs and Tasks intoreg
- an array of length 4 returned by walkRegTree
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |