HIGUCHI Yuta | a56fbde | 2013-06-17 14:26:05 -0700 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.linkdiscovery.internal; |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 2 | |
| 3 | import net.floodlightcontroller.core.web.serializers.DPIDSerializer; |
| 4 | |
| 5 | import org.codehaus.jackson.annotate.JsonProperty; |
| 6 | import org.codehaus.jackson.map.annotate.JsonSerialize; |
| 7 | |
| 8 | /*** |
| 9 | * Topology Cluster merge/split event history related classes and members |
| 10 | * @author subrata |
| 11 | * |
| 12 | */ |
| 13 | public class EventHistoryTopologyCluster { |
| 14 | // The following fields are not stored as String to save memory |
| 15 | // They should be converted to appropriate human-readable strings by |
| 16 | // the front end (e.g. in cli in Python) |
| 17 | public long dpid; |
| 18 | public long clusterIdOld; // Switch with dpid moved from cluster x to y |
| 19 | public long clusterIdNew; |
| 20 | public String reason; |
| 21 | |
| 22 | @JsonProperty("Switch") |
| 23 | @JsonSerialize(using=DPIDSerializer.class) |
| 24 | public long getDpid() { |
| 25 | return dpid; |
| 26 | } |
| 27 | @JsonProperty("OldClusterId") |
| 28 | @JsonSerialize(using=DPIDSerializer.class) |
| 29 | public long getClusterIdOld() { |
| 30 | return clusterIdOld; |
| 31 | } |
| 32 | @JsonProperty("NewClusterId") |
| 33 | @JsonSerialize(using=DPIDSerializer.class) |
| 34 | public long getClusterIdNew() { |
| 35 | return clusterIdNew; |
| 36 | } |
| 37 | @JsonProperty("Reason") |
| 38 | public String getReason() { |
| 39 | return reason; |
| 40 | } |
| 41 | |
| 42 | |
| 43 | } |