m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/messages/AttributesMessage.java
blob: e3bd39037cfda53012d73ba16e5f29da98794e60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package pl.edu.mimuw.cloudatlas.agent.messages;

import java.util.Map;

import pl.edu.mimuw.cloudatlas.model.AttributesMap;
import pl.edu.mimuw.cloudatlas.model.ValueDuration;
import pl.edu.mimuw.cloudatlas.model.PathName;

public class AttributesMessage extends RemoteGossipGirlMessage {
    private PathName path;
    private AttributesMap attributes;
    private long receiverGossipId;
    private ValueDuration offset;

    public AttributesMessage(String messageId, long timestamp, PathName path, AttributesMap attributes, long receiverGossipId, ValueDuration offset) {
        super(messageId, timestamp, Type.ATTRIBUTES);
        this.path = path;
        this.attributes = attributes;
        this.receiverGossipId = receiverGossipId;
        this.offset = offset;
    }

    private AttributesMessage() {}

    public PathName getPath() {
        return path;
    }

    public AttributesMap getAttributes() {
        return attributes;
    }

    public long getReceiverGossipId() {
        return receiverGossipId;
    }

    public ValueDuration getOffset() {
        return offset;
    }
}