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

Method advanceTo

output/java_guava/1.4.17/LocalCache.java:4406–4421  ·  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

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

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