Yuta HIGUCHI

KryoSerializer usage fix

Change-Id: I48e578b33f4c13272a4aa780ee6718e38c2cbea8
...@@ -4,6 +4,7 @@ import static org.onlab.onos.store.statistic.impl.StatisticStoreMessageSubjects. ...@@ -4,6 +4,7 @@ import static org.onlab.onos.store.statistic.impl.StatisticStoreMessageSubjects.
4 import static org.slf4j.LoggerFactory.getLogger; 4 import static org.slf4j.LoggerFactory.getLogger;
5 5
6 import com.google.common.collect.ImmutableSet; 6 import com.google.common.collect.ImmutableSet;
7 +
7 import org.apache.felix.scr.annotations.Activate; 8 import org.apache.felix.scr.annotations.Activate;
8 import org.apache.felix.scr.annotations.Component; 9 import org.apache.felix.scr.annotations.Component;
9 import org.apache.felix.scr.annotations.Deactivate; 10 import org.apache.felix.scr.annotations.Deactivate;
...@@ -26,9 +27,9 @@ import org.onlab.onos.store.flow.ReplicaInfo; ...@@ -26,9 +27,9 @@ import org.onlab.onos.store.flow.ReplicaInfo;
26 import org.onlab.onos.store.flow.ReplicaInfoService; 27 import org.onlab.onos.store.flow.ReplicaInfoService;
27 import org.onlab.onos.store.serializers.KryoNamespaces; 28 import org.onlab.onos.store.serializers.KryoNamespaces;
28 import org.onlab.onos.store.serializers.KryoSerializer; 29 import org.onlab.onos.store.serializers.KryoSerializer;
30 +import org.onlab.util.KryoNamespace;
29 import org.slf4j.Logger; 31 import org.slf4j.Logger;
30 32
31 -
32 import java.io.IOException; 33 import java.io.IOException;
33 import java.util.HashSet; 34 import java.util.HashSet;
34 import java.util.Map; 35 import java.util.Map;
...@@ -70,7 +71,9 @@ public class DistributedStatisticStore implements StatisticStore { ...@@ -70,7 +71,9 @@ public class DistributedStatisticStore implements StatisticStore {
70 protected static final KryoSerializer SERIALIZER = new KryoSerializer() { 71 protected static final KryoSerializer SERIALIZER = new KryoSerializer() {
71 @Override 72 @Override
72 protected void setupKryoPool() { 73 protected void setupKryoPool() {
73 - serializerPool = KryoNamespaces.API.newBuilder() 74 + serializerPool = KryoNamespace.newBuilder()
75 + .register(KryoNamespaces.API)
76 + // register this store specific classes here
74 .build() 77 .build()
75 .populate(1); 78 .populate(1);
76 } 79 }
......