Advances to the given entry. Returns true if the entry was valid, false if it should be skipped.
(ReferenceEntry<K, V> entry)
| 4404 | */ |
| 4405 | |
| 4406 | boolean advanceTo(ReferenceEntry<K, V> entry) { |
| 4407 | try { |
| 4408 | long now = ticker.read(); |
| 4409 | K key = entry.getKey(); |
| 4410 | V value = getLiveValue(entry, now); |
| 4411 | if (value != null) { |
| 4412 | nextExternal = new WriteThroughEntry(key, value); |
| 4413 | return true; |
| 4414 | } else { |
| 4415 | // Skip stale entry. |
| 4416 | return false; |
| 4417 | } |
| 4418 | } finally { |
| 4419 | currentSegment.postReadCleanup(); |
| 4420 | } |
| 4421 | } |
| 4422 | |
| 4423 | @Override |
| 4424 | public boolean hasNext() { |
no test coverage detected