diff options
Diffstat (limited to 'sources/core/VSTaskManager.java')
| -rw-r--r-- | sources/core/VSTaskManager.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sources/core/VSTaskManager.java b/sources/core/VSTaskManager.java index 4f79d16..1857865 100644 --- a/sources/core/VSTaskManager.java +++ b/sources/core/VSTaskManager.java @@ -216,6 +216,7 @@ public class VSTaskManager { return false; } + /* public synchronized LinkedList<VSTask> getProtocolTasks(VSProtocol protocol) { LinkedList<VSTask> protocolTasks = new LinkedList<VSTask>(); @@ -277,6 +278,34 @@ public class VSTaskManager { insert(task); } } +*/ + public synchronized VSPriorityQueue<VSTask> getLocalTasks() { + VSPriorityQueue<VSTask> processTasks = new VSPriorityQueue<VSTask>(); + + for (VSTask task : fullfilledProgrammedTasks) + if (!task.isGlobalTimed() && task.isProgrammed()) + processTasks.add(task); + + for (VSTask task : tasks) + if (task.isProgrammed()) + processTasks.add(task); + + return processTasks; + } + + public synchronized VSPriorityQueue<VSTask> getGlobalTasks() { + VSPriorityQueue<VSTask> processTasks = new VSPriorityQueue<VSTask>(); + + for (VSTask task : fullfilledProgrammedTasks) + if (task.isGlobalTimed() && task.isProgrammed()) + processTasks.add(task); + + for (VSTask task : globalTasks) + if (task.isProgrammed()) + processTasks.add(task); + + return processTasks; + } public synchronized VSPriorityQueue<VSTask> getProcessLocalTasks(VSProcess process) { VSPriorityQueue<VSTask> processTasks = new VSPriorityQueue<VSTask>(); |
