blob: 7864580571c5b44e056e49a8fcf9fef7288d2e84 [file] [log] [blame]
Madan Jampani2ff05592014-10-10 15:42:47 -07001package org.onlab.onos.store.link.impl;
2
3import org.onlab.onos.net.LinkKey;
4import org.onlab.onos.store.Timestamp;
5
6import com.google.common.base.MoreObjects;
7
8/**
9 * Information published by GossipLinkStore to notify peers of a link
10 * being removed.
11 */
12public class InternalLinkRemovedEvent {
13
14 private final LinkKey linkKey;
15 private final Timestamp timestamp;
16
17 /**
18 * Creates a InternalLinkRemovedEvent.
19 * @param linkKey identifier of the removed link.
20 * @param timestamp timestamp of when the link was removed.
21 */
22 public InternalLinkRemovedEvent(LinkKey linkKey, Timestamp timestamp) {
23 this.linkKey = linkKey;
24 this.timestamp = timestamp;
25 }
26
27 public LinkKey linkKey() {
28 return linkKey;
29 }
30
31 public Timestamp timestamp() {
32 return timestamp;
33 }
34
35 @Override
36 public String toString() {
37 return MoreObjects.toStringHelper(getClass())
38 .add("linkKey", linkKey)
39 .add("timestamp", timestamp)
40 .toString();
41 }
42
43 // for serializer
44 @SuppressWarnings("unused")
45 private InternalLinkRemovedEvent() {
46 linkKey = null;
47 timestamp = null;
48 }
Yuta HIGUCHI8ce08732014-10-11 10:40:45 -070049}