Code example for LoadingCache

Methods: get

0
    } 
 
    @Override 
    public Map<String, Property> getTerminology(Locale locale) {
        try { 
            return terminologyCache.get(locale);
        } catch (ExecutionException e) {
            logger.error("Failed to retrieve termininology from cache. Skipping check.",e);
            return Collections.emptyMap();
        } 
    } 
 
    @Override 
    public Map<String, Property> load(Locale locale) throws Exception {
        if(version.get()==null){
            //recreate the supplier in case we have terminology later 
            version  = Suppliers.memoize((Supplier<ProjectVersion>) this);
        } 
        ProjectVersion projectVersion = version.get();
        if(projectVersion!=null){