Search in sources :

Example 1 with MappingId

use of org.onosproject.mapping.MappingId in project onos by opennetworkinglab.

the class DistributedMappingStore method activate.

@Activate
public void activate() {
    Serializer serializer = Serializer.using(KryoNamespaces.API, Mapping.class, DefaultMapping.class, MappingId.class, MappingEvent.Type.class, MappingKey.class, MappingValue.class, MappingAddress.class, MappingAddress.Type.class, MappingAction.class, MappingAction.Type.class, MappingTreatment.class, MappingInstruction.class, MappingInstruction.Type.class);
    database = storageService.<MappingId, Mapping>consistentMapBuilder().withName("onos-mapping-database").withSerializer(serializer).build();
    cache = storageService.<MappingId, Mapping>consistentMapBuilder().withName("onos-mapping-cache").withSerializer(serializer).build();
    database.addListener(listener);
    cache.addListener(listener);
    databaseMap = database.asJavaMap();
    cacheMap = cache.asJavaMap();
    log.info("Started");
}
Also used : MappingId(org.onosproject.mapping.MappingId) MappingEvent(org.onosproject.mapping.MappingEvent) MappingAddress(org.onosproject.mapping.addresses.MappingAddress) MappingAction(org.onosproject.mapping.actions.MappingAction) DefaultMapping(org.onosproject.mapping.DefaultMapping) Mapping(org.onosproject.mapping.Mapping) MappingInstruction(org.onosproject.mapping.instructions.MappingInstruction) Serializer(org.onosproject.store.service.Serializer) Activate(org.osgi.service.component.annotations.Activate)

Aggregations

DefaultMapping (org.onosproject.mapping.DefaultMapping)1 Mapping (org.onosproject.mapping.Mapping)1 MappingEvent (org.onosproject.mapping.MappingEvent)1 MappingId (org.onosproject.mapping.MappingId)1 MappingAction (org.onosproject.mapping.actions.MappingAction)1 MappingAddress (org.onosproject.mapping.addresses.MappingAddress)1 MappingInstruction (org.onosproject.mapping.instructions.MappingInstruction)1 Serializer (org.onosproject.store.service.Serializer)1 Activate (org.osgi.service.component.annotations.Activate)1