Search in sources :

Example 1 with SimpleMapCache

use of org.opendaylight.lispflowmapping.mapcache.SimpleMapCache in project lispflowmapping by opendaylight.

the class MappingSystem method buildMapCaches.

private void buildMapCaches() {
    /*
         * There exists a direct relationship between MappingOrigins and the tables that are part of the MappingSystem.
         * Therefore, if a new origin is added, probably a new table should be instantiated here as well. Here we
         * instantiate a SimpleMapCache for southbound originated LISP mappings and a MultiTableMapCache for northbound
         * originated mappings. Use of FlatMapCache would be possible when no longest prefix match is needed at all,
         * but that option is no longer supported in the code, since it was never tested and may lead to unexpected
         * results.
         */
    sdao = dao.putTable(MappingOrigin.Southbound.toString());
    pmc = new MultiTableMapCache(dao.putTable(MappingOrigin.Northbound.toString()));
    smc = new SimpleMapCache(sdao);
    akdb = new AuthKeyDb(dao.putTable(AUTH_KEY_TABLE));
    tableMap.put(MappingOrigin.Northbound, pmc);
    tableMap.put(MappingOrigin.Southbound, smc);
}
Also used : IAuthKeyDb(org.opendaylight.lispflowmapping.interfaces.mapcache.IAuthKeyDb) AuthKeyDb(org.opendaylight.lispflowmapping.mapcache.AuthKeyDb) MultiTableMapCache(org.opendaylight.lispflowmapping.mapcache.MultiTableMapCache) SimpleMapCache(org.opendaylight.lispflowmapping.mapcache.SimpleMapCache)

Aggregations

IAuthKeyDb (org.opendaylight.lispflowmapping.interfaces.mapcache.IAuthKeyDb)1 AuthKeyDb (org.opendaylight.lispflowmapping.mapcache.AuthKeyDb)1 MultiTableMapCache (org.opendaylight.lispflowmapping.mapcache.MultiTableMapCache)1 SimpleMapCache (org.opendaylight.lispflowmapping.mapcache.SimpleMapCache)1