@Override public synchronized CategoryGraph getGraph(Language language) throws DaoException { if (graphs.containsKey(language)) { return graphs.get(language); } String key = "cat-graph-" + language.getLangCode(); if (cache != null) { CategoryGraph graph = (CategoryGraph) cache.get(key, LocalPage.class, LocalCategoryMember.class); if (graph != null) { graphs.put(language, graph); return graph; } } LocalCategoryGraphBuilder builder = new LocalCategoryGraphBuilder(localPageDao, this); CategoryGraph graph = builder.build(language); cache.put(key, graph); graphs.put(language, graph); return graph; }
return new HashMap<Language, SortedSet<DateTime>>(); Map<Language, SortedSet<DateTime>> loaded = (Map<Language, SortedSet<DateTime>>) cache.get(LOADED_CACHE_KEY, PageView.class); if (loaded != null) { return loaded;
return new HashMap<Language, SortedSet<DateTime>>(); Map<Language, SortedSet<DateTime>> loaded = (Map<Language, SortedSet<DateTime>>) cache.get(LOADED_CACHE_KEY, PageView.class); if (loaded != null) { return loaded;
properties = (Map<Integer, WikidataEntity>) cache.get("wikidata-properties", WikidataEntity.class);
properties = (Map<Integer, WikidataEntity>) cache.get("wikidata-properties", WikidataEntity.class);
TLongIntHashMap map = (TLongIntHashMap)cache.get(key, LocalPage.class); if (map!=null){ titlesToIds = map;