blob: 6c8b905ccb561c021ce36dcb720ac833d9c73687 [file] [log] [blame]
Madan Jampani3fc72ed2014-10-08 12:50:27 -07001package org.onlab.onos.store.device.impl;
2
3import org.onlab.onos.net.DeviceId;
4import org.onlab.onos.store.Timestamp;
5
6/**
7 * Information published by GossipDeviceStore to notify peers of a device
8 * being administratively removed.
9 */
10public 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}