blob: 923453a94febc07e1559ca25e07b18e3e99d1b85 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Yuta HIGUCHI5ec89f92014-10-12 01:01:43 -070016package org.onlab.onos.store.device.impl;
Yuta HIGUCHI9ee60f62014-10-09 10:00:01 -070017
18import static com.google.common.base.Preconditions.checkNotNull;
19
20import java.util.Collection;
21
22import org.onlab.onos.cluster.NodeId;
23
24/**
25 * Message to request for other peers information.
26 */
27public class DeviceAntiEntropyRequest {
28
29 private final NodeId sender;
30 private final Collection<DeviceFragmentId> devices;
31 private final Collection<PortFragmentId> ports;
32
33 public DeviceAntiEntropyRequest(NodeId sender,
34 Collection<DeviceFragmentId> devices,
35 Collection<PortFragmentId> ports) {
36
37 this.sender = checkNotNull(sender);
38 this.devices = checkNotNull(devices);
39 this.ports = checkNotNull(ports);
40 }
41
42 public NodeId sender() {
43 return sender;
44 }
45
46 public Collection<DeviceFragmentId> devices() {
47 return devices;
48 }
49
50 public Collection<PortFragmentId> ports() {
51 return ports;
52 }
53
54 // For serializer
55 @SuppressWarnings("unused")
56 private DeviceAntiEntropyRequest() {
57 this.sender = null;
58 this.devices = null;
59 this.ports = null;
60 }
61}