blob: d8942d6af7b5120a1572bff34fc31523fd20a207 [file] [log] [blame]
Madan Jampani5009cfb2014-10-08 11:21:07 -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 * going offline.
9 */
10public class InternalDeviceOfflineEvent {
11
12 private final DeviceId deviceId;
13 private final Timestamp timestamp;
14
15 /**
16 * Creates a InternalDeviceOfflineEvent.
17 * @param deviceId identifier of device going offline.
18 * @param timestamp timestamp of when the device went offline.
19 */
20 public InternalDeviceOfflineEvent(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 InternalDeviceOfflineEvent() {
36 deviceId = null;
37 timestamp = null;
38 }
39}