Yuta HIGUCHI | 5ec89f9 | 2014-10-12 01:01:43 -0700 | [diff] [blame] | 1 | package org.onlab.onos.store.device.impl; |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 2 | |
| 3 | import static com.google.common.base.Preconditions.checkNotNull; |
| 4 | |
| 5 | import java.util.Collection; |
| 6 | |
| 7 | import org.onlab.onos.cluster.NodeId; |
| 8 | |
| 9 | /** |
| 10 | * Message to request for other peers information. |
| 11 | */ |
| 12 | public 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 | } |