blob: 613900561859305a7a46eb254a66b8a598007a69 [file] [log] [blame]
Yuta HIGUCHI5fa3dc02014-10-15 17:08:13 -07001package org.onlab.onos.store.host.impl;
2
3import static com.google.common.base.Preconditions.checkNotNull;
4
5import java.util.Map;
6
7import org.onlab.onos.cluster.NodeId;
8import org.onlab.onos.net.HostId;
9import org.onlab.onos.store.Timestamp;
10
11/**
12 * Host AE Advertisement message.
13 */
14public final class HostAntiEntropyAdvertisement {
15
16 private final NodeId sender;
17 private final Map<HostFragmentId, Timestamp> timestamps;
18 private final Map<HostId, Timestamp> tombstones;
19
20
21 public HostAntiEntropyAdvertisement(NodeId sender,
22 Map<HostFragmentId, Timestamp> timestamps,
23 Map<HostId, Timestamp> tombstones) {
24 this.sender = checkNotNull(sender);
25 this.timestamps = checkNotNull(timestamps);
26 this.tombstones = checkNotNull(tombstones);
27 }
28
29 public NodeId sender() {
30 return sender;
31 }
32
33 public Map<HostFragmentId, Timestamp> timestamps() {
34 return timestamps;
35 }
36
37 public Map<HostId, Timestamp> tombstones() {
38 return tombstones;
39 }
40
41 // For serializer
42 @SuppressWarnings("unused")
43 private HostAntiEntropyAdvertisement() {
44 this.sender = null;
45 this.timestamps = null;
46 this.tombstones = null;
47 }
48}