} else { successes.putAll(result); throw new BulkCacheLoadingException(failures, successes);
@Override public Map<String, String> loadAll(final Iterable<? extends String> keys) throws Exception { if (isBulkCacheLoadingExceptionEnabled) { Map<String, Exception> failures = new HashMap<>(); Map<String, String> loadedKeys = new HashMap<>(); Exception loadingException = new RuntimeException("Exception loading keys"); for (String key : keys) { if (failingKeys.contains(key)) { failures.put(key, loadingException); } else { loadedKeys.put(key, this.entries.get(key)); } } throw new BulkCacheLoadingException(failures, loadedKeys); } final Map<String, String> resultMap = new HashMap<>(); for (final String key : keys) { if (this.failingKeys.contains(key)) { throw new FailedKeyException(key); } resultMap.put(key, this.entries.get(key)); } return resultMap; }
} else { successes.putAll(result); throw new BulkCacheLoadingException(failures, successes);