Cleanup the implementation of class TopologyEvent and associated classes.
The major addition is the new method TopologyEvent.getEventType() that
returns the type of the event: SWITCH, PORT, LINK, HOST, MASTERSHIP
* Refactor and move around the implementation of methods like
hashCode() equals() and toString()
* Remove method getID() from classes MastershipEvent, SwitchEvent, PortEvent
LinkEvent, HostEvent, and keep it only in TopologyEvent where it is
actually needed.
* Changed class TopologyElement to abstract, and added two abstract
methods: getOriginDpid() and getIDasByteBuffer() which are already
implemented by all FooEvent derived classes.
No functional changes.
Change-Id: I62f4723cb3f4b519f365c04e7b736abda9b1973b
diff --git a/src/main/java/net/onrc/onos/core/util/serializers/KryoFactory.java b/src/main/java/net/onrc/onos/core/util/serializers/KryoFactory.java
index e48b01b..18e0767 100644
--- a/src/main/java/net/onrc/onos/core/util/serializers/KryoFactory.java
+++ b/src/main/java/net/onrc/onos/core/util/serializers/KryoFactory.java
@@ -176,6 +176,7 @@
kryo.register(TopologyBatchOperation.Operator.class);
kryo.register(TopologyElement.class);
kryo.register(TopologyEvent.class);
+ kryo.register(TopologyEvent.Type.class);
// Intent-related classes
kryo.register(Path.class);