MCPcopy Create free account
hub / github.com/antlr/codebuff / advanceTo

Method advanceTo

output/java_guava/1.4.13/LocalCache.java:4385–4400  ·  view source on GitHub ↗

Advances to the given entry. Returns true if the entry was valid, false if it should be skipped.

(ReferenceEntry<K, V> entry)

Source from the content-addressed store, hash-verified

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() {

Callers 2

nextInChainMethod · 0.95
nextInTableMethod · 0.95

Calls 4

getKeyMethod · 0.65
readMethod · 0.45
getLiveValueMethod · 0.45
postReadCleanupMethod · 0.45

Tested by

no test coverage detected