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");
}
Aggregations