Madan Jampani | 312a298 | 2014-10-14 21:07:16 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.store.host.impl; |
| 2 | |
| 3 | import org.onlab.onos.net.HostId; |
| 4 | import org.onlab.onos.net.host.HostDescription; |
| 5 | import org.onlab.onos.net.provider.ProviderId; |
| 6 | import org.onlab.onos.store.Timestamp; |
| 7 | |
| 8 | /** |
| 9 | * Information published by GossipHostStore to notify peers of a host |
| 10 | * change (create/update) event. |
| 11 | */ |
| 12 | public class InternalHostEvent { |
| 13 | |
| 14 | private final ProviderId providerId; |
| 15 | private final HostId hostId; |
| 16 | private final HostDescription hostDescription; |
| 17 | private final Timestamp timestamp; |
| 18 | |
| 19 | public InternalHostEvent(ProviderId providerId, HostId hostId, |
| 20 | HostDescription hostDescription, Timestamp timestamp) { |
| 21 | this.providerId = providerId; |
| 22 | this.hostId = hostId; |
| 23 | this.hostDescription = hostDescription; |
| 24 | this.timestamp = timestamp; |
| 25 | } |
| 26 | |
| 27 | public ProviderId providerId() { |
| 28 | return providerId; |
| 29 | } |
| 30 | |
| 31 | public HostId hostId() { |
| 32 | return hostId; |
| 33 | } |
| 34 | |
| 35 | public HostDescription hostDescription() { |
| 36 | return hostDescription; |
| 37 | } |
| 38 | |
| 39 | public Timestamp timestamp() { |
| 40 | return timestamp; |
| 41 | } |
| 42 | |
| 43 | // Needed for serialization. |
| 44 | @SuppressWarnings("unused") |
| 45 | private InternalHostEvent() { |
| 46 | providerId = null; |
| 47 | hostId = null; |
| 48 | hostDescription = null; |
| 49 | timestamp = null; |
| 50 | } |
| 51 | } |