@Override public void loadAll(Set<? extends K> keys, boolean replaceExistingValues, CompletionListener completionListener) { checkClosed(); if (keys == null) { throw new NullPointerException(); } for (K key : keys) { if (key == null) { throw new NullPointerException(); } } completionListener = completionListener != null ? completionListener : NullCompletionListener.INSTANCE; if (cacheLoaderWriter == null) { completionListener.onCompletion(); return; } try { jsr107Cache.loadAll(keys, replaceExistingValues, this::loadAllFunction); } catch (Exception e) { final CacheLoaderException cle; cle = getCacheLoaderException(e); completionListener.onException(cle); return; } completionListener.onCompletion(); }
@Override public void loadAll(Set<? extends K> keys, boolean replaceExistingValues, CompletionListener completionListener) { checkClosed(); if (keys == null) { throw new NullPointerException(); } for (K key : keys) { if (key == null) { throw new NullPointerException(); } } completionListener = completionListener != null ? completionListener : NullCompletionListener.INSTANCE; if (cacheLoaderWriter == null) { completionListener.onCompletion(); return; } try { jsr107Cache.loadAll(keys, replaceExistingValues, this::loadAllFunction); } catch (Exception e) { final CacheLoaderException cle; cle = getCacheLoaderException(e); completionListener.onException(cle); return; } completionListener.onCompletion(); }