m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages
diff options
context:
space:
mode:
authorMartin <marcin.j.chrzanowski@gmail.com>2020-01-11 13:09:18 +0100
committerGitHub <noreply@github.com>2020-01-11 13:09:18 +0100
commitc125370268544a1321aaa2152e200b5a74664880 (patch)
tree6845a53aab8b5f2f54db15364afcc8efb181c605 /src/main/java/pl/edu/mimuw/cloudatlas/agent/messages
parentf54068421c2b4883b3fbcc4e003d83ff528b5cc4 (diff)
parentb87f3adc2dd665b186866d2fb345819dba2d1f35 (diff)
Merge pull request #92 from m-chrzan/gossip-girl-2
Finish gossip girl
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/messages')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/HejkaMessage.java14
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/NoCoTamMessage.java2
2 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/HejkaMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/HejkaMessage.java
index 340d939..62554a5 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/HejkaMessage.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/HejkaMessage.java
@@ -8,12 +8,16 @@ import pl.edu.mimuw.cloudatlas.model.ValueTime;
public class HejkaMessage extends RemoteGossipGirlMessage {
private long senderGossipId;
+ private PathName senderPath;
+ private PathName receiverPath;
private Map<PathName, ValueTime> zoneTimestamps;
private Map<Attribute, ValueTime> queryTimestamps;
- public HejkaMessage(String messageId, long timestamp, long senderGossipId, Map<PathName, ValueTime> zoneTimestamps, Map<Attribute, ValueTime> queryTimestamps) {
+ public HejkaMessage(String messageId, long timestamp, long senderGossipId, PathName senderPath, PathName receiverPath, Map<PathName, ValueTime> zoneTimestamps, Map<Attribute, ValueTime> queryTimestamps) {
super(messageId, timestamp, Type.HEJKA);
this.senderGossipId = senderGossipId;
+ this.senderPath = senderPath;
+ this.receiverPath = receiverPath;
this.zoneTimestamps = zoneTimestamps;
this.queryTimestamps = queryTimestamps;
}
@@ -22,6 +26,14 @@ public class HejkaMessage extends RemoteGossipGirlMessage {
return senderGossipId;
}
+ public PathName getSenderPath() {
+ return senderPath;
+ }
+
+ public PathName getReceiverPath() {
+ return receiverPath;
+ }
+
public Map<PathName, ValueTime> getZoneTimestamps() {
return zoneTimestamps;
}
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/NoCoTamMessage.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/NoCoTamMessage.java
index 3dd0c4d..c23722c 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/NoCoTamMessage.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/NoCoTamMessage.java
@@ -14,7 +14,7 @@ public class NoCoTamMessage extends RemoteGossipGirlMessage {
private ValueTime hejkaSendTimestamp;
private ValueTime hejkaReceiveTimestamp;
- public NoCoTamMessage(String messageId, long timestamp, long receiverGossipId, long senderGossipId, Map<PathName, ValueTime> zoneTimestamps, Map<Attribute, ValueTime> queryTimestamps, ValueTime hejkaSendTimestamp, ValueTime hejkaReceiveTimestamp) {
+ public NoCoTamMessage(String messageId, long timestamp, long senderGossipId, long receiverGossipId, Map<PathName, ValueTime> zoneTimestamps, Map<Attribute, ValueTime> queryTimestamps, ValueTime hejkaSendTimestamp, ValueTime hejkaReceiveTimestamp) {
super(messageId, timestamp, Type.NO_CO_TAM);
this.receiverGossipId = receiverGossipId;
this.senderGossipId = senderGossipId;