Madan Jampani | 3fc72ed | 2014-10-08 12:50:27 -0700 | [diff] [blame] | 1 | package org.onlab.onos.store.device.impl; |
| 2 | |
| 3 | import org.onlab.onos.net.DeviceId; |
| 4 | import org.onlab.onos.store.Timestamp; |
| 5 | |
| 6 | /** |
| 7 | * Information published by GossipDeviceStore to notify peers of a device |
| 8 | * being administratively removed. |
| 9 | */ |
| 10 | public class InternalDeviceRemovedEvent { |
| 11 | |
| 12 | private final DeviceId deviceId; |
| 13 | private final Timestamp timestamp; |
| 14 | |
| 15 | /** |
| 16 | * Creates a InternalDeviceRemovedEvent. |
| 17 | * @param deviceId identifier of the removed device. |
| 18 | * @param timestamp timestamp of when the device was administratively removed. |
| 19 | */ |
| 20 | public InternalDeviceRemovedEvent(DeviceId deviceId, Timestamp timestamp) { |
| 21 | this.deviceId = deviceId; |
| 22 | this.timestamp = timestamp; |
| 23 | } |
| 24 | |
| 25 | public DeviceId deviceId() { |
| 26 | return deviceId; |
| 27 | } |
| 28 | |
| 29 | public Timestamp timestamp() { |
| 30 | return timestamp; |
| 31 | } |
| 32 | |
| 33 | // for serializer |
| 34 | @SuppressWarnings("unused") |
| 35 | private InternalDeviceRemovedEvent() { |
| 36 | deviceId = null; |
| 37 | timestamp = null; |
| 38 | } |
| 39 | } |