@Override public Cache.Entry<K, V> next() { try { Cache.Entry<K, Store.ValueHolder<V>> next = iterator.next(); final K nextKey = next.getKey(); Store.ValueHolder<V> nextValueHolder = next.getValue(); // call Cache.get() here to check for expiry *and* account for a get in the stats, without using the loader if (cache.getNoLoader(nextKey) == null) { current = null; return null; } current = next; final V nextValue = nextValueHolder.get(); return new Cache.Entry<K, V>() { @Override public K getKey() { return nextKey; } @Override public V getValue() { return nextValue; } }; } catch (StoreAccessException sae) { current = null; return null; } }
@Override public Cache.Entry<K, V> next() { try { Cache.Entry<K, Store.ValueHolder<V>> next = iterator.next(); final K nextKey = next.getKey(); Store.ValueHolder<V> nextValueHolder = next.getValue(); // call Cache.get() here to check for expiry *and* account for a get in the stats, without using the loader if (cache.getNoLoader(nextKey) == null) { current = null; return null; } current = next; final V nextValue = nextValueHolder.get(); return new Cache.Entry<K, V>() { @Override public K getKey() { return nextKey; } @Override public V getValue() { return nextValue; } }; } catch (StoreAccessException sae) { current = null; return null; } }