m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-01-10 22:58:32 +0100
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-01-10 22:58:32 +0100
commit89af38da0b95445180440e85bb8248ab910ef9f8 (patch)
treebc66f7c2342b4f32477e93eca366887c646325ec /src/main/java/pl/edu/mimuw/cloudatlas/agent/messages
parent14bc721b07017c6c4d29f84d7ee807bca0d7de31 (diff)
Send NoCoTam when responder gets state
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;