Remove duplicate registrations.
- MapEvent.class, MapEvent.Type.class, Versioned.class part of API,
and all the existing caller was supplying API as base namespace.
- MeterId, MapUpdate part of API
- Default{Device, Port} part of API
- WallClockTimestamp is always added by ECMap
Change-Id: I654c892549e6dddbe5e1f86dbb41d1ca4e84611f
diff --git a/core/api/src/main/java/org/onosproject/store/service/Serializer.java b/core/api/src/main/java/org/onosproject/store/service/Serializer.java
index 5ad35a3..5608333 100644
--- a/core/api/src/main/java/org/onosproject/store/service/Serializer.java
+++ b/core/api/src/main/java/org/onosproject/store/service/Serializer.java
@@ -86,7 +86,6 @@
KryoNamespace.Builder builder = new KryoNamespace.Builder();
namespaces.forEach(builder::register);
Lists.newArrayList(classes).forEach(builder::register);
- builder.register(MapEvent.class, MapEvent.Type.class, Versioned.class);
KryoNamespace namespace = builder.build();
return new Serializer() {
@Override
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
index 4f367f8..d2d450e 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
@@ -231,8 +231,8 @@
// Create a distributed map for port stats.
KryoNamespace.Builder deviceDataSerializer = KryoNamespace.newBuilder()
.register(KryoNamespaces.API)
- .register(MultiValuedTimestamp.class)
- .register(WallClockTimestamp.class);
+ .nextId(KryoNamespaces.BEGIN_USER_CUSTOM_ID)
+ .register(MultiValuedTimestamp.class);
devicePortStats = storageService.<DeviceId, Map<PortNumber, PortStatistics>>eventuallyConsistentMapBuilder()
.withName("port-stats")
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
index 99e1976..98aa3cf 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
@@ -91,9 +91,9 @@
public void activate() {
KryoNamespace.Builder intentSerializer = KryoNamespace.newBuilder()
.register(KryoNamespaces.API)
+ .nextId(KryoNamespaces.BEGIN_USER_CUSTOM_ID)
.register(IntentData.class)
- .register(MultiValuedTimestamp.class)
- .register(WallClockTimestamp.class);
+ .register(MultiValuedTimestamp.class);
currentMap = storageService.<Key, IntentData>eventuallyConsistentMapBuilder()
.withName("intent-current")
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/StorageManager.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/StorageManager.java
index b4074ba..4def1e9 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/StorageManager.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/StorageManager.java
@@ -35,7 +35,6 @@
import org.onosproject.persistence.PersistenceService;
import org.onosproject.store.cluster.messaging.ClusterCommunicationService;
import org.onosproject.store.primitives.DistributedPrimitiveCreator;
-import org.onosproject.store.primitives.MapUpdate;
import org.onosproject.store.primitives.PartitionAdminService;
import org.onosproject.store.primitives.PartitionService;
import org.onosproject.store.primitives.TransactionId;
@@ -103,8 +102,6 @@
transactions = this.<TransactionId, Transaction.State>consistentMapBuilder()
.withName("onos-transactions")
.withSerializer(Serializer.using(KryoNamespaces.API,
- MapUpdate.class,
- MapUpdate.Type.class,
Transaction.class,
Transaction.State.class))
.buildAsyncMap();
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/meter/impl/DistributedMeterStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/meter/impl/DistributedMeterStore.java
index ecef57f..be7de21 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/meter/impl/DistributedMeterStore.java
+++ b/incubator/store/src/main/java/org/onosproject/incubator/store/meter/impl/DistributedMeterStore.java
@@ -32,7 +32,6 @@
import org.onosproject.net.meter.Meter;
import org.onosproject.net.meter.MeterEvent;
import org.onosproject.net.meter.MeterFailReason;
-import org.onosproject.net.meter.MeterId;
import org.onosproject.net.meter.MeterKey;
import org.onosproject.net.meter.MeterOperation;
import org.onosproject.net.meter.MeterState;
@@ -103,8 +102,7 @@
Band.Type.class,
MeterState.class,
Meter.Unit.class,
- MeterFailReason.class,
- MeterId.class)).build();
+ MeterFailReason.class)).build();
meters.addListener(mapListener);
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/DistributedVirtualNetworkStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/DistributedVirtualNetworkStore.java
index 1452dfc..800ecfd 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/DistributedVirtualNetworkStore.java
+++ b/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/DistributedVirtualNetworkStore.java
@@ -42,8 +42,6 @@
import org.onosproject.incubator.net.virtual.VirtualNetworkStoreDelegate;
import org.onosproject.incubator.net.virtual.VirtualPort;
import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.DefaultDevice;
-import org.onosproject.net.DefaultPort;
import org.onosproject.net.Device;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Port;
@@ -133,10 +131,9 @@
.register(VirtualPort.class)
.register(DefaultVirtualPort.class)
.register(Device.class)
- .register(DefaultDevice.class)
- .register(DefaultPort.class)
.register(TunnelId.class)
- .nextId(KryoNamespaces.BEGIN_USER_CUSTOM_ID).build());
+ .nextId(KryoNamespaces.BEGIN_USER_CUSTOM_ID)
+ .build("VirtualNetworkStore"));
/**
* Distributed network store service activate method.