MCPcopy
hub / github.com/google/guava / isLive

Method isLive

guava/src/com/google/common/cache/LocalCache.java:1748–1751  ·  view source on GitHub ↗

This method is a convenience for testing. Code should call {@link Segment#getLiveValue} instead.

(ReferenceEntry<K, V> entry, long now)

Source from the content-addressed store, hash-verified

1746 * instead.
1747 */
1748 @VisibleForTesting
1749 boolean isLive(ReferenceEntry<K, V> entry, long now) {
1750 return segmentFor(entry.getHash()).getLiveValue(entry, now) != null;
1751 }
1752
1753 /**
1754 * Returns the segment that should be used for a key with the given hash.

Callers 3

countLiveEntriesMethod · 0.45
testExpireAfterWriteMethod · 0.45
testExpireAfterAccessMethod · 0.45

Calls 3

segmentForMethod · 0.95
getHashMethod · 0.65
getLiveValueMethod · 0.45

Tested by 3

countLiveEntriesMethod · 0.36
testExpireAfterWriteMethod · 0.36
testExpireAfterAccessMethod · 0.36