summaryrefslogtreecommitdiff
path: root/sources/core/VSMessage.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-17 14:55:16 +0000
committerPaul Buetow <paul@buetow.org>2008-05-17 14:55:16 +0000
commit271949bf140359dd97cbee9ef927ee9280c9f31f (patch)
tree31cd0e175401d2041e23128402c235eb6d2e3117 /sources/core/VSMessage.java
parent5a0924146201bc577ca170952a21a42464ac7c71 (diff)
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
Diffstat (limited to 'sources/core/VSMessage.java')
-rw-r--r--sources/core/VSMessage.java6
1 files changed, 6 insertions, 0 deletions
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;
}