Madan Jampani | 47c9373 | 2014-10-06 20:46:08 -0700 | [diff] [blame] | 1 | package org.onlab.onos.store.device.impl; |
| 2 | |
| 3 | import java.util.List; |
| 4 | |
| 5 | import org.onlab.onos.net.DeviceId; |
| 6 | import org.onlab.onos.net.device.PortDescription; |
| 7 | import org.onlab.onos.net.provider.ProviderId; |
| 8 | import org.onlab.onos.store.common.impl.Timestamped; |
| 9 | |
Madan Jampani | 2206e01 | 2014-10-06 21:04:20 -0700 | [diff] [blame] | 10 | /** |
| 11 | * Information published by GossipDeviceStore to notify peers of a port |
| 12 | * change event. |
| 13 | */ |
Madan Jampani | 47c9373 | 2014-10-06 20:46:08 -0700 | [diff] [blame] | 14 | public 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 HIGUCHI | 3cc1907 | 2014-10-07 17:33:23 -0700 | [diff] [blame] | 40 | |
| 41 | // for serializer |
| 42 | protected InternalPortEvent() { |
| 43 | this.providerId = null; |
| 44 | this.deviceId = null; |
| 45 | this.portDescriptions = null; |
| 46 | } |
Madan Jampani | 47c9373 | 2014-10-06 20:46:08 -0700 | [diff] [blame] | 47 | } |