diff options
Diffstat (limited to 'sources/core')
| -rw-r--r-- | sources/core/VSMessage.java | 8 | ||||
| -rw-r--r-- | sources/core/VSProcess.java | 3 | ||||
| -rw-r--r-- | sources/core/VSTaskManager.java | 17 |
3 files changed, 5 insertions, 23 deletions
diff --git a/sources/core/VSMessage.java b/sources/core/VSMessage.java index 95bcc7a..127f314 100644 --- a/sources/core/VSMessage.java +++ b/sources/core/VSMessage.java @@ -7,12 +7,12 @@ import protocols.*; public class VSMessage extends VSPrefs { private String protocolClassname; + private VSPrefs prefs; private VSProcess sendingProcess; + private VSVectorTime vectorTime; + private long lamportTime; private long messageID; private static long messageCounter; - private long lamportTime; - private VSVectorTime vectorTime; - private VSPrefs prefs; public VSMessage(String protocolClassname) { this.protocolClassname = protocolClassname; @@ -72,7 +72,5 @@ public class VSMessage extends VSPrefs { } public void logg(String message) { } - public void onInit() { } - public void onStart() { } } diff --git a/sources/core/VSProcess.java b/sources/core/VSProcess.java index 5612d89..f92898e 100644 --- a/sources/core/VSProcess.java +++ b/sources/core/VSProcess.java @@ -555,7 +555,8 @@ public class VSProcess extends VSPrefs { VSProtocol protocol = null; if (!objectExists(protocolClassname)) { - protocol = (VSProtocol) VSRegisteredEvents.createEventInstanceByClassname(protocolClassname, this); + protocol = (VSProtocol) + VSRegisteredEvents.createEventInstanceByClassname(protocolClassname, this); setObject(protocolClassname, protocol); protocolsToReset.add(protocol); diff --git a/sources/core/VSTaskManager.java b/sources/core/VSTaskManager.java index 6b419cf..a9f3ba3 100644 --- a/sources/core/VSTaskManager.java +++ b/sources/core/VSTaskManager.java @@ -16,28 +16,11 @@ public class VSTaskManager { public VSTaskManager(VSPrefs prefs) { this.prefs = prefs; - //Comparator<VSTask> comparator = createComparator(); this.tasks = new PriorityQueue<VSTask>();//100, comparator); this.globalTasks = new PriorityQueue<VSTask>();//(100, comparator); this.fullfilledProgrammedTasks = new LinkedList<VSTask>(); } - /* - private Comparator<VSTask> createComparator() { - return new Comparator<VSTask>() { - public int compare(VSTask a, VSTask b) { - if (a.getTaskTime() > b.getTaskTime()) - return 1; - - if (a.getTaskTime() < b.getTaskTime()) - return -1; - - return 0; - } - }; - } - */ - public synchronized void runTasks(final long step, final long offset, final long lastGlobalTime) { VSTask task = null; VSProcess process = null; |
