@Override public void loadAll(Set<K> keys, boolean replaceExistingValues) { checkTrue(isMapStoreEnabled(), "First you should configure a map store"); checkNotNull(keys, NULL_KEYS_ARE_NOT_ALLOWED); checkNoNullInside(keys, NULL_KEY_IS_NOT_ALLOWED); loadInternal(keys, null, replaceExistingValues); }
@Override public void loadAll(Set<K> keys, boolean replaceExistingValues) { checkTrue(isMapStoreEnabled(), "First you should configure a map store"); checkNotNull(keys, NULL_KEYS_ARE_NOT_ALLOWED); checkNoNullInside(keys, NULL_KEY_IS_NOT_ALLOWED); loadInternal(keys, null, replaceExistingValues); }
@Override public Map<K, V> getAll(Set<K> keys) { checkNotNull(keys, "keys cannot be null"); checkNoNullInside(keys, "supplied key-set cannot contain null key"); if (keys.isEmpty()) { return Collections.emptyMap(); } if (!includeValue) { return getDelegate().getAll(keys); } Map<K, V> map = MapUtil.createHashMap(keys.size()); for (K key : keys) { Data keyData = toData(key); QueryCacheRecord record = recordStore.get(keyData); if (record != null) { V value = toObject(record.getValue()); map.put(key, value); } } return map; }
@Override public Map<K, V> getAll(Set<K> keys) { checkNotNull(keys, "keys cannot be null"); checkNoNullInside(keys, "supplied key-set cannot contain null key"); if (keys.isEmpty()) { return Collections.emptyMap(); } if (!includeValue) { return getDelegate().getAll(keys); } Map<K, V> map = MapUtil.createHashMap(keys.size()); for (K key : keys) { Data keyData = toData(key); QueryCacheRecord record = recordStore.get(keyData); if (record != null) { V value = toObject(record.getValue()); map.put(key, value); } } return map; }