Register flow-manager and match-action related classes to KryoFactory.
- The following classes are now registered and available on KryoFactory:
-- FlowId
-- Path
-- Tree
-- FlowLink
-- OpticalPathFlow
-- PacketPathFlow
-- SingleDstTreeFlow
-- PacketMatch
-- OutputAction
-- ModifyDstMacAction
-- ModifyDstMacAction
- This task is a preperation for ONOS-1736 and ONOS-1842.
Change-Id: If438f5175e68672e0ce02f56681c35c3be87f0bc
diff --git a/src/main/java/net/onrc/onos/api/flowmanager/PathFlow.java b/src/main/java/net/onrc/onos/api/flowmanager/PathFlow.java
index 0cc35ce..943140d 100644
--- a/src/main/java/net/onrc/onos/api/flowmanager/PathFlow.java
+++ b/src/main/java/net/onrc/onos/api/flowmanager/PathFlow.java
@@ -2,6 +2,7 @@
import static com.google.common.base.Preconditions.checkNotNull;
+import java.util.LinkedList;
import java.util.List;
import net.onrc.onos.core.matchaction.action.Action;
@@ -16,6 +17,16 @@
private final List<Action> egressActions;
/**
+ * Default constructor for Kryo deserialization.
+ */
+ @Deprecated
+ protected PathFlow() {
+ ingressPort = null;
+ path = null;
+ egressActions = null;
+ }
+
+ /**
* Creates the new flow instance.
*
* @param id ID for this new PathFlow object
@@ -28,8 +39,8 @@
PortNumber ingressPort, Path path, List<Action> egressActions) {
super(id);
this.ingressPort = checkNotNull(ingressPort);
- this.path = checkNotNull(path);
- this.egressActions = checkNotNull(egressActions);
+ this.path = new Path(checkNotNull(path));
+ this.egressActions = new LinkedList<>(checkNotNull(egressActions));
}
/**