mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-17 02:11:38 +02:00
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
This commit is contained in:
parent
e72906522a
commit
03666a3d08
@ -86,7 +86,6 @@ public interface Serializer {
|
||||
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
|
||||
|
@ -231,8 +231,8 @@ public class GossipDeviceStore
|
||||
// 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")
|
||||
|
@ -91,9 +91,9 @@ public class GossipIntentStore
|
||||
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")
|
||||
|
@ -35,7 +35,6 @@ import org.onosproject.cluster.PartitionId;
|
||||
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 @@ public class StorageManager implements StorageService, StorageAdminService {
|
||||
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();
|
||||
|
@ -32,7 +32,6 @@ import org.onosproject.net.meter.DefaultMeter;
|
||||
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 @@ public class DistributedMeterStore extends AbstractStore<MeterEvent, MeterStoreD
|
||||
Band.Type.class,
|
||||
MeterState.class,
|
||||
Meter.Unit.class,
|
||||
MeterFailReason.class,
|
||||
MeterId.class)).build();
|
||||
MeterFailReason.class)).build();
|
||||
|
||||
meters.addListener(mapListener);
|
||||
|
||||
|
@ -42,8 +42,6 @@ import org.onosproject.incubator.net.virtual.VirtualNetworkStore;
|
||||
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 @@ public class DistributedVirtualNetworkStore
|
||||
.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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user