Rename KryoPool -> KryoNamespace

Change-Id: Ife1c311b40eaab133bb3b8dd3314b98c60b4411d
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
index 44159a7..55d8b1a 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/cluster/messaging/impl/ClusterCommunicationManager.java
@@ -23,10 +23,10 @@
 import org.onlab.onos.store.cluster.messaging.ClusterMessageResponse;
 import org.onlab.onos.store.cluster.messaging.MessageSubject;
 import org.onlab.onos.store.serializers.ClusterMessageSerializer;
-import org.onlab.onos.store.serializers.KryoPoolUtil;
+import org.onlab.onos.store.serializers.KryoNamespaces;
 import org.onlab.onos.store.serializers.KryoSerializer;
 import org.onlab.onos.store.serializers.MessageSubjectSerializer;
-import org.onlab.util.KryoPool;
+import org.onlab.util.KryoNamespace;
 import org.onlab.netty.Endpoint;
 import org.onlab.netty.Message;
 import org.onlab.netty.MessageHandler;
@@ -52,8 +52,8 @@
     private static final KryoSerializer SERIALIZER = new KryoSerializer() {
         @Override
         protected void setupKryoPool() {
-            serializerPool = KryoPool.newBuilder()
-                    .register(KryoPoolUtil.API)
+            serializerPool = KryoNamespace.newBuilder()
+                    .register(KryoNamespaces.API)
                     .register(ClusterMessage.class, new ClusterMessageSerializer())
                     .register(ClusterMembershipEvent.class)
                     .register(byte[].class)
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java
index d471bc9..fdc0827 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/device/impl/GossipDeviceStore.java
@@ -42,7 +42,7 @@
 import org.onlab.onos.store.serializers.KryoSerializer;
 import org.onlab.onos.store.serializers.DistributedStoreSerializers;
 import org.onlab.packet.ChassisId;
-import org.onlab.util.KryoPool;
+import org.onlab.util.KryoNamespace;
 import org.onlab.util.NewConcurrentHashMap;
 import org.slf4j.Logger;
 
@@ -117,7 +117,7 @@
     protected static final KryoSerializer SERIALIZER = new KryoSerializer() {
         @Override
         protected void setupKryoPool() {
-            serializerPool = KryoPool.newBuilder()
+            serializerPool = KryoNamespace.newBuilder()
                     .register(DistributedStoreSerializers.COMMON)
 
                     .register(InternalDeviceEvent.class, new InternalDeviceEventSerializer())
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java
index dbe6734..e5b2ed6 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/flow/impl/DistributedFlowRuleStore.java
@@ -35,7 +35,7 @@
 import org.onlab.onos.store.flow.ReplicaInfoService;
 import org.onlab.onos.store.serializers.DistributedStoreSerializers;
 import org.onlab.onos.store.serializers.KryoSerializer;
-import org.onlab.util.KryoPool;
+import org.onlab.util.KryoNamespace;
 import org.slf4j.Logger;
 
 import com.google.common.collect.ArrayListMultimap;
@@ -72,7 +72,7 @@
     protected static final KryoSerializer SERIALIZER = new KryoSerializer() {
         @Override
         protected void setupKryoPool() {
-            serializerPool = KryoPool.newBuilder()
+            serializerPool = KryoNamespace.newBuilder()
                     .register(DistributedStoreSerializers.COMMON)
                     .build()
                     .populate(1);
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStore.java
index f43ae8e..e3d8fe0 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/host/impl/GossipHostStore.java
@@ -44,7 +44,7 @@
 import org.onlab.packet.IpPrefix;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
-import org.onlab.util.KryoPool;
+import org.onlab.util.KryoNamespace;
 import org.slf4j.Logger;
 
 import java.io.IOException;
@@ -99,7 +99,7 @@
     private static final KryoSerializer SERIALIZER = new KryoSerializer() {
         @Override
         protected void setupKryoPool() {
-            serializerPool = KryoPool.newBuilder()
+            serializerPool = KryoNamespace.newBuilder()
                     .register(DistributedStoreSerializers.COMMON)
                     .register(InternalHostEvent.class)
                     .register(InternalHostRemovedEvent.class)
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java
index d5ce52a..312d072 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/link/impl/GossipLinkStore.java
@@ -42,7 +42,7 @@
 import org.onlab.onos.store.impl.Timestamped;
 import org.onlab.onos.store.serializers.DistributedStoreSerializers;
 import org.onlab.onos.store.serializers.KryoSerializer;
-import org.onlab.util.KryoPool;
+import org.onlab.util.KryoNamespace;
 import org.slf4j.Logger;
 
 import java.io.IOException;
@@ -110,7 +110,7 @@
     private static final KryoSerializer SERIALIZER = new KryoSerializer() {
         @Override
         protected void setupKryoPool() {
-            serializerPool = KryoPool.newBuilder()
+            serializerPool = KryoNamespace.newBuilder()
                     .register(DistributedStoreSerializers.COMMON)
                     .register(InternalLinkEvent.class)
                     .register(InternalLinkRemovedEvent.class)
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java
index 114150f..2f03c87 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/serializers/DistributedStoreSerializers.java
@@ -3,15 +3,15 @@
 import org.onlab.onos.store.impl.MastershipBasedTimestamp;
 import org.onlab.onos.store.impl.Timestamped;
 import org.onlab.onos.store.impl.WallClockTimestamp;
-import org.onlab.util.KryoPool;
+import org.onlab.util.KryoNamespace;
 
 public final class DistributedStoreSerializers {
 
     /**
-     * KryoPool which can serialize ON.lab misc classes.
+     * KryoNamespace which can serialize ON.lab misc classes.
      */
-    public static final KryoPool COMMON = KryoPool.newBuilder()
-            .register(KryoPoolUtil.API)
+    public static final KryoNamespace COMMON = KryoNamespace.newBuilder()
+            .register(KryoNamespaces.API)
             .register(Timestamped.class)
             .register(MastershipBasedTimestamp.class, new MastershipBasedTimestampSerializer())
             .register(WallClockTimestamp.class)
diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/impl/MastershipBasedTimestampTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/impl/MastershipBasedTimestampTest.java
index b455989..ae36d78 100644
--- a/core/store/dist/src/test/java/org/onlab/onos/store/impl/MastershipBasedTimestampTest.java
+++ b/core/store/dist/src/test/java/org/onlab/onos/store/impl/MastershipBasedTimestampTest.java
@@ -7,7 +7,7 @@
 import org.junit.Test;
 import org.onlab.onos.store.Timestamp;
 import org.onlab.onos.store.serializers.MastershipBasedTimestampSerializer;
-import org.onlab.util.KryoPool;
+import org.onlab.util.KryoNamespace;
 
 import com.google.common.testing.EqualsTester;
 
@@ -63,7 +63,7 @@
     @Test
     public final void testKryoSerializable() {
         final ByteBuffer buffer = ByteBuffer.allocate(1 * 1024 * 1024);
-        final KryoPool kryos = KryoPool.newBuilder()
+        final KryoNamespace kryos = KryoNamespace.newBuilder()
                 .register(MastershipBasedTimestamp.class)
                 .build();
 
@@ -79,7 +79,7 @@
     @Test
     public final void testKryoSerializableWithHandcraftedSerializer() {
         final ByteBuffer buffer = ByteBuffer.allocate(1 * 1024 * 1024);
-        final KryoPool kryos = KryoPool.newBuilder()
+        final KryoNamespace kryos = KryoNamespace.newBuilder()
                 .register(MastershipBasedTimestamp.class, new MastershipBasedTimestampSerializer())
                 .build();
 
diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/impl/TimestampedTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/impl/TimestampedTest.java
index 3e7fec2..23a97be 100644
--- a/core/store/dist/src/test/java/org/onlab/onos/store/impl/TimestampedTest.java
+++ b/core/store/dist/src/test/java/org/onlab/onos/store/impl/TimestampedTest.java
@@ -6,7 +6,7 @@
 
 import org.junit.Test;
 import org.onlab.onos.store.Timestamp;
-import org.onlab.util.KryoPool;
+import org.onlab.util.KryoNamespace;
 
 import com.google.common.testing.EqualsTester;
 
@@ -77,7 +77,7 @@
     @Test
     public final void testKryoSerializable() {
         final ByteBuffer buffer = ByteBuffer.allocate(1 * 1024 * 1024);
-        final KryoPool kryos = KryoPool.newBuilder()
+        final KryoNamespace kryos = KryoNamespace.newBuilder()
                 .register(Timestamped.class,
                         MastershipBasedTimestamp.class)
                 .build();
diff --git a/core/store/dist/src/test/java/org/onlab/onos/store/impl/WallClockTimestampTest.java b/core/store/dist/src/test/java/org/onlab/onos/store/impl/WallClockTimestampTest.java
index 76e4be0..370c9f6 100644
--- a/core/store/dist/src/test/java/org/onlab/onos/store/impl/WallClockTimestampTest.java
+++ b/core/store/dist/src/test/java/org/onlab/onos/store/impl/WallClockTimestampTest.java
@@ -6,7 +6,7 @@
 
 import org.junit.Test;
 import org.onlab.onos.store.Timestamp;
-import org.onlab.util.KryoPool;
+import org.onlab.util.KryoNamespace;
 
 import com.google.common.testing.EqualsTester;
 
@@ -30,7 +30,7 @@
     public final void testKryoSerializable() {
         WallClockTimestamp ts1 = new WallClockTimestamp();
         final ByteBuffer buffer = ByteBuffer.allocate(1 * 1024 * 1024);
-        final KryoPool kryos = KryoPool.newBuilder()
+        final KryoNamespace kryos = KryoNamespace.newBuilder()
                 .register(WallClockTimestamp.class)
                 .build();