blob: 64e77ca787c564b8d1bb1523cc096959a8ba138e [file] [log] [blame]
Madan Jampani47c93732014-10-06 20:46:08 -07001package org.onlab.onos.store.device.impl;
2
3import java.util.List;
4
5import org.onlab.onos.net.DeviceId;
6import org.onlab.onos.net.device.PortDescription;
7import org.onlab.onos.net.provider.ProviderId;
8import org.onlab.onos.store.common.impl.Timestamped;
9
Madan Jampani2206e012014-10-06 21:04:20 -070010/**
11 * Information published by GossipDeviceStore to notify peers of a port
12 * change event.
13 */
Madan Jampani47c93732014-10-06 20:46:08 -070014public class InternalPortEvent {
15
16 private final ProviderId providerId;
17 private final DeviceId deviceId;
18 private final Timestamped<List<PortDescription>> portDescriptions;
19
20 protected InternalPortEvent(
21 ProviderId providerId,
22 DeviceId deviceId,
23 Timestamped<List<PortDescription>> portDescriptions) {
24 this.providerId = providerId;
25 this.deviceId = deviceId;
26 this.portDescriptions = portDescriptions;
27 }
28
29 public DeviceId deviceId() {
30 return deviceId;
31 }
32
33 public ProviderId providerId() {
34 return providerId;
35 }
36
37 public Timestamped<List<PortDescription>> portDescriptions() {
38 return portDescriptions;
39 }
Yuta HIGUCHI3cc19072014-10-07 17:33:23 -070040
41 // for serializer
42 protected InternalPortEvent() {
43 this.providerId = null;
44 this.deviceId = null;
45 this.portDescriptions = null;
46 }
Madan Jampani47c93732014-10-06 20:46:08 -070047}