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

Method getLiveValue

output/java_guava/1.4.17/LocalCache.java:2832–2847  ·  view source on GitHub ↗

Gets the value from an entry. Returns null if the entry is invalid, partially-collected, loading, or expired.

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

Source from the content-addressed store, hash-verified

2830 */
2831
2832 V getLiveValue(ReferenceEntry<K, V> entry, long now) {
2833 if (entry.getKey() == null) {
2834 tryDrainReferenceQueues();
2835 return null;
2836 }
2837 V value = entry.getValueReference().get();
2838 if (value == null) {
2839 tryDrainReferenceQueues();
2840 return null;
2841 }
2842 if (map.isExpired(entry, now)) {
2843 tryExpireEntries(now);
2844 return null;
2845 }
2846 return value;
2847 }
2848
2849 @Nullable
2850 V get(Object key, int hash) {

Callers 4

getMethod · 0.95
containsValueMethod · 0.95
getMethod · 0.95
refreshMethod · 0.95

Calls 6

tryExpireEntriesMethod · 0.95
getKeyMethod · 0.65
getMethod · 0.65
getValueReferenceMethod · 0.65
isExpiredMethod · 0.45

Tested by

no test coverage detected