blob: 7b63c083f7c6c9dfc3cc99971ac891954961200c [file] [log] [blame]
Yuta HIGUCHI5ec89f92014-10-12 01:01:43 -07001package org.onlab.onos.store.device.impl;
Yuta HIGUCHI9ee60f62014-10-09 10:00:01 -07002
3import static com.google.common.base.Preconditions.checkNotNull;
4
5import java.util.Collection;
6
7import org.onlab.onos.cluster.NodeId;
8
9/**
10 * Message to request for other peers information.
11 */
12public class DeviceAntiEntropyRequest {
13
14 private final NodeId sender;
15 private final Collection<DeviceFragmentId> devices;
16 private final Collection<PortFragmentId> ports;
17
18 public DeviceAntiEntropyRequest(NodeId sender,
19 Collection<DeviceFragmentId> devices,
20 Collection<PortFragmentId> ports) {
21
22 this.sender = checkNotNull(sender);
23 this.devices = checkNotNull(devices);
24 this.ports = checkNotNull(ports);
25 }
26
27 public NodeId sender() {
28 return sender;
29 }
30
31 public Collection<DeviceFragmentId> devices() {
32 return devices;
33 }
34
35 public Collection<PortFragmentId> ports() {
36 return ports;
37 }
38
39 // For serializer
40 @SuppressWarnings("unused")
41 private DeviceAntiEntropyRequest() {
42 this.sender = null;
43 this.devices = null;
44 this.ports = null;
45 }
46}