Advances to the given entry. Returns true if the entry was valid, false if it should be skipped.
(ReferenceEntry<K, V> entry)
| 4383 | */ |
| 4384 | |
| 4385 | boolean advanceTo(ReferenceEntry<K, V> entry) { |
| 4386 | try { |
| 4387 | long now = ticker.read(); |
| 4388 | K key = entry.getKey(); |
| 4389 | V value = getLiveValue(entry, now); |
| 4390 | if (value != null) { |
| 4391 | nextExternal = new WriteThroughEntry(key, value); |
| 4392 | return true; |
| 4393 | } else { |
| 4394 | // Skip stale entry. |
| 4395 | return false; |
| 4396 | } |
| 4397 | } finally { |
| 4398 | currentSegment.postReadCleanup(); |
| 4399 | } |
| 4400 | } |
| 4401 | |
| 4402 | @Override |
| 4403 | public boolean hasNext() { |
no test coverage detected