mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-18 10:51:04 +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();
|
KryoNamespace.Builder builder = new KryoNamespace.Builder();
|
||||||
namespaces.forEach(builder::register);
|
namespaces.forEach(builder::register);
|
||||||
Lists.newArrayList(classes).forEach(builder::register);
|
Lists.newArrayList(classes).forEach(builder::register);
|
||||||
builder.register(MapEvent.class, MapEvent.Type.class, Versioned.class);
|
|
||||||
KryoNamespace namespace = builder.build();
|
KryoNamespace namespace = builder.build();
|
||||||
return new Serializer() {
|
return new Serializer() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -231,8 +231,8 @@ public class GossipDeviceStore
|
|||||||
// Create a distributed map for port stats.
|
// Create a distributed map for port stats.
|
||||||
KryoNamespace.Builder deviceDataSerializer = KryoNamespace.newBuilder()
|
KryoNamespace.Builder deviceDataSerializer = KryoNamespace.newBuilder()
|
||||||
.register(KryoNamespaces.API)
|
.register(KryoNamespaces.API)
|
||||||
.register(MultiValuedTimestamp.class)
|
.nextId(KryoNamespaces.BEGIN_USER_CUSTOM_ID)
|
||||||
.register(WallClockTimestamp.class);
|
.register(MultiValuedTimestamp.class);
|
||||||
|
|
||||||
devicePortStats = storageService.<DeviceId, Map<PortNumber, PortStatistics>>eventuallyConsistentMapBuilder()
|
devicePortStats = storageService.<DeviceId, Map<PortNumber, PortStatistics>>eventuallyConsistentMapBuilder()
|
||||||
.withName("port-stats")
|
.withName("port-stats")
|
||||||
|
@ -91,9 +91,9 @@ public class GossipIntentStore
|
|||||||
public void activate() {
|
public void activate() {
|
||||||
KryoNamespace.Builder intentSerializer = KryoNamespace.newBuilder()
|
KryoNamespace.Builder intentSerializer = KryoNamespace.newBuilder()
|
||||||
.register(KryoNamespaces.API)
|
.register(KryoNamespaces.API)
|
||||||
|
.nextId(KryoNamespaces.BEGIN_USER_CUSTOM_ID)
|
||||||
.register(IntentData.class)
|
.register(IntentData.class)
|
||||||
.register(MultiValuedTimestamp.class)
|
.register(MultiValuedTimestamp.class);
|
||||||
.register(WallClockTimestamp.class);
|
|
||||||
|
|
||||||
currentMap = storageService.<Key, IntentData>eventuallyConsistentMapBuilder()
|
currentMap = storageService.<Key, IntentData>eventuallyConsistentMapBuilder()
|
||||||
.withName("intent-current")
|
.withName("intent-current")
|
||||||
|
@ -35,7 +35,6 @@ import org.onosproject.cluster.PartitionId;
|
|||||||
import org.onosproject.persistence.PersistenceService;
|
import org.onosproject.persistence.PersistenceService;
|
||||||
import org.onosproject.store.cluster.messaging.ClusterCommunicationService;
|
import org.onosproject.store.cluster.messaging.ClusterCommunicationService;
|
||||||
import org.onosproject.store.primitives.DistributedPrimitiveCreator;
|
import org.onosproject.store.primitives.DistributedPrimitiveCreator;
|
||||||
import org.onosproject.store.primitives.MapUpdate;
|
|
||||||
import org.onosproject.store.primitives.PartitionAdminService;
|
import org.onosproject.store.primitives.PartitionAdminService;
|
||||||
import org.onosproject.store.primitives.PartitionService;
|
import org.onosproject.store.primitives.PartitionService;
|
||||||
import org.onosproject.store.primitives.TransactionId;
|
import org.onosproject.store.primitives.TransactionId;
|
||||||
@ -103,8 +102,6 @@ public class StorageManager implements StorageService, StorageAdminService {
|
|||||||
transactions = this.<TransactionId, Transaction.State>consistentMapBuilder()
|
transactions = this.<TransactionId, Transaction.State>consistentMapBuilder()
|
||||||
.withName("onos-transactions")
|
.withName("onos-transactions")
|
||||||
.withSerializer(Serializer.using(KryoNamespaces.API,
|
.withSerializer(Serializer.using(KryoNamespaces.API,
|
||||||
MapUpdate.class,
|
|
||||||
MapUpdate.Type.class,
|
|
||||||
Transaction.class,
|
Transaction.class,
|
||||||
Transaction.State.class))
|
Transaction.State.class))
|
||||||
.buildAsyncMap();
|
.buildAsyncMap();
|
||||||
|
@ -32,7 +32,6 @@ import org.onosproject.net.meter.DefaultMeter;
|
|||||||
import org.onosproject.net.meter.Meter;
|
import org.onosproject.net.meter.Meter;
|
||||||
import org.onosproject.net.meter.MeterEvent;
|
import org.onosproject.net.meter.MeterEvent;
|
||||||
import org.onosproject.net.meter.MeterFailReason;
|
import org.onosproject.net.meter.MeterFailReason;
|
||||||
import org.onosproject.net.meter.MeterId;
|
|
||||||
import org.onosproject.net.meter.MeterKey;
|
import org.onosproject.net.meter.MeterKey;
|
||||||
import org.onosproject.net.meter.MeterOperation;
|
import org.onosproject.net.meter.MeterOperation;
|
||||||
import org.onosproject.net.meter.MeterState;
|
import org.onosproject.net.meter.MeterState;
|
||||||
@ -103,8 +102,7 @@ public class DistributedMeterStore extends AbstractStore<MeterEvent, MeterStoreD
|
|||||||
Band.Type.class,
|
Band.Type.class,
|
||||||
MeterState.class,
|
MeterState.class,
|
||||||
Meter.Unit.class,
|
Meter.Unit.class,
|
||||||
MeterFailReason.class,
|
MeterFailReason.class)).build();
|
||||||
MeterId.class)).build();
|
|
||||||
|
|
||||||
meters.addListener(mapListener);
|
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.VirtualNetworkStoreDelegate;
|
||||||
import org.onosproject.incubator.net.virtual.VirtualPort;
|
import org.onosproject.incubator.net.virtual.VirtualPort;
|
||||||
import org.onosproject.net.ConnectPoint;
|
import org.onosproject.net.ConnectPoint;
|
||||||
import org.onosproject.net.DefaultDevice;
|
|
||||||
import org.onosproject.net.DefaultPort;
|
|
||||||
import org.onosproject.net.Device;
|
import org.onosproject.net.Device;
|
||||||
import org.onosproject.net.DeviceId;
|
import org.onosproject.net.DeviceId;
|
||||||
import org.onosproject.net.Port;
|
import org.onosproject.net.Port;
|
||||||
@ -133,10 +131,9 @@ public class DistributedVirtualNetworkStore
|
|||||||
.register(VirtualPort.class)
|
.register(VirtualPort.class)
|
||||||
.register(DefaultVirtualPort.class)
|
.register(DefaultVirtualPort.class)
|
||||||
.register(Device.class)
|
.register(Device.class)
|
||||||
.register(DefaultDevice.class)
|
|
||||||
.register(DefaultPort.class)
|
|
||||||
.register(TunnelId.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.
|
* Distributed network store service activate method.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user