Sho SHIMIZU
Committed by Gerrit Code Review

Simplify statements to define serializer just for KryoNamespaces.API

Change-Id: Iac8c6233ab142bc382f35fbd070d4386a7baf64c
...@@ -21,7 +21,6 @@ import org.apache.felix.scr.annotations.Deactivate; ...@@ -21,7 +21,6 @@ import org.apache.felix.scr.annotations.Deactivate;
21 import org.apache.felix.scr.annotations.Reference; 21 import org.apache.felix.scr.annotations.Reference;
22 import org.apache.felix.scr.annotations.ReferenceCardinality; 22 import org.apache.felix.scr.annotations.ReferenceCardinality;
23 import org.apache.felix.scr.annotations.Service; 23 import org.apache.felix.scr.annotations.Service;
24 -import org.onlab.util.KryoNamespace;
25 import org.onosproject.net.DeviceId; 24 import org.onosproject.net.DeviceId;
26 import org.onosproject.net.Port; 25 import org.onosproject.net.Port;
27 import org.onosproject.net.device.DeviceService; 26 import org.onosproject.net.device.DeviceService;
...@@ -56,8 +55,7 @@ public class ConsistentDeviceResourceStore implements DeviceResourceStore { ...@@ -56,8 +55,7 @@ public class ConsistentDeviceResourceStore implements DeviceResourceStore {
56 private static final String INTENT_MAPPING = "IntentMapping"; 55 private static final String INTENT_MAPPING = "IntentMapping";
57 private static final String INTENT_ALLOCATIONS = "PortIntentAllocations"; 56 private static final String INTENT_ALLOCATIONS = "PortIntentAllocations";
58 57
59 - private static final Serializer SERIALIZER = Serializer.using( 58 + private static final Serializer SERIALIZER = Serializer.using(KryoNamespaces.API);
60 - new KryoNamespace.Builder().register(KryoNamespaces.API).build());
61 59
62 private ConsistentMap<Port, IntentId> portAllocMap; 60 private ConsistentMap<Port, IntentId> portAllocMap;
63 private ConsistentMap<IntentId, Set<Port>> intentAllocMap; 61 private ConsistentMap<IntentId, Set<Port>> intentAllocMap;
......
...@@ -20,7 +20,6 @@ import org.onlab.util.Bandwidth; ...@@ -20,7 +20,6 @@ import org.onlab.util.Bandwidth;
20 import org.onosproject.net.OmsPort; 20 import org.onosproject.net.OmsPort;
21 import org.onosproject.net.device.DeviceService; 21 import org.onosproject.net.device.DeviceService;
22 import org.slf4j.Logger; 22 import org.slf4j.Logger;
23 -import org.onlab.util.KryoNamespace;
24 import org.onlab.util.PositionalParameterStringFormatter; 23 import org.onlab.util.PositionalParameterStringFormatter;
25 import org.onosproject.net.Link; 24 import org.onosproject.net.Link;
26 import org.onosproject.net.LinkKey; 25 import org.onosproject.net.LinkKey;
...@@ -85,8 +84,7 @@ public class ConsistentLinkResourceStore extends ...@@ -85,8 +84,7 @@ public class ConsistentLinkResourceStore extends
85 /** IntentId -> LinkResourceAllocations. */ 84 /** IntentId -> LinkResourceAllocations. */
86 private static final String INTENT_ALLOCATIONS = "LinkIntentAllocations"; 85 private static final String INTENT_ALLOCATIONS = "LinkIntentAllocations";
87 86
88 - private static final Serializer SERIALIZER = Serializer.using( 87 + private static final Serializer SERIALIZER = Serializer.using(KryoNamespaces.API);
89 - new KryoNamespace.Builder().register(KryoNamespaces.API).build());
90 88
91 // for reading committed values. 89 // for reading committed values.
92 private ConsistentMap<IntentId, LinkResourceAllocations> intentAllocMap; 90 private ConsistentMap<IntentId, LinkResourceAllocations> intentAllocMap;
......