From 271949bf140359dd97cbee9ef927ee9280c9f31f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 17 May 2008 14:55:16 +0000 Subject: Vectortimestamps work Better representation of Lamporttimestamps BerkelyTimeProtocol M trunk/ROADMAP M trunk/sources/prefs/VSPrefs.java M trunk/sources/prefs/VSDefaultPrefs.java M trunk/sources/simulator/VSMain.java M trunk/sources/simulator/VSSimulation.java M trunk/sources/simulator/VSSimulationPanel.java M trunk/sources/utils/VSFrame.java M trunk/sources/utils/VSClassLoader.java M trunk/sources/utils/VSInfoArea.java M trunk/sources/protocols/BroadcastSturmProtocol.java M trunk/sources/protocols/ExternalTimeSyncProtocol.java M trunk/sources/protocols/RegisteredProtocols.java M trunk/sources/protocols/PingPongProtocol.java M trunk/sources/protocols/InternalTimeSyncProtocol.java M trunk/sources/protocols/VSProtocol.java M trunk/sources/protocols/DummyProtocol.java A trunk/sources/protocols/BerkelyTimeProtocol.java M trunk/sources/core/VSLamport.java M trunk/sources/core/VSProcess.java A trunk/sources/core/VSTime.java A trunk/sources/core/VSVectorTime.java M trunk/sources/core/VSTask.java M trunk/sources/core/VSMessage.java M trunk/sources/editors/VSEditor.java M trunk/sources/editors/VSProtocolEditor.java M trunk/sources/editors/VSSimulationEditor.java M trunk/sources/editors/VSEditorFrame.java M trunk/sources/editors/VSProcessEditor.java --- sources/core/VSMessage.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sources/core/VSMessage.java') diff --git a/sources/core/VSMessage.java b/sources/core/VSMessage.java index b3c1d31..466fc4d 100644 --- a/sources/core/VSMessage.java +++ b/sources/core/VSMessage.java @@ -10,6 +10,7 @@ public class VSMessage extends VSPrefs implements VSEvent { private long messageID; private static long messageCounter; private long lamportTime; + private VSVectorTime vectorTime; public VSMessage(String protocolClassname) { this.protocolClassname = protocolClassname; @@ -31,6 +32,7 @@ public class VSMessage extends VSPrefs implements VSEvent { public void setSendingProcess(VSProcess sendingProcess) { this.sendingProcess = sendingProcess; lamportTime = sendingProcess.getLamportTime(); + vectorTime = sendingProcess.getVectorTime().getCopy(); } public VSProcess getSendingProcess() { @@ -41,6 +43,10 @@ public class VSMessage extends VSPrefs implements VSEvent { return lamportTime; } + public VSVectorTime getVectorTime() { + return vectorTime; + } + public String toString() { return "ID: " + messageID; } -- cgit v1.2.3