/** * Reset the database cache with the LDAP data. Note there is no synchronization for this method. Initial first * concurrent calls may note involve the cache. * * @return The fresh LDAP data.. */ protected Map<CacheDataType, Map<String, ? extends ResourceOrg>> refreshData() { final Map<CacheDataType, Map<String, ? extends ResourceOrg>> result = new EnumMap<>(CacheDataType.class); // Fetch origin data log.info("Fetching origin data ..."); final Map<String, GroupOrg> groups = getGroup().findAllNoCache(); result.put(CacheDataType.COMPANY, getCompany().findAllNoCache()); result.put(CacheDataType.GROUP, groups); result.put(CacheDataType.USER, getUser().findAllNoCache(groups)); this.data = result; return result; }