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

Method setValue

output/java_guava/1.4.19/LocalCache.java:2244–2253  ·  view source on GitHub ↗

Sets a new value of an entry. Adds newly created entries at the end of the access queue.

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

Source from the content-addressed store, hash-verified

2242 */
2243
2244 @GuardedBy("this")
2245 void setValue(ReferenceEntry<K, V> entry, K key, V value, long now) {
2246 ValueReference<K, V> previous = entry.getValueReference();
2247 int weight = map.weigher.weigh(key, value);
2248 checkState(weight >= 0, "Weights must be non-negative");
2249 ValueReference<K, V> valueReference = map.valueStrength.referenceValue(this, entry, value, weight);
2250 entry.setValueReference(valueReference);
2251 recordWrite(entry, weight, now);
2252 previous.notifyNewValue(value);
2253 }
2254
2255 // loading
2256

Callers 3

putMethod · 0.95
replaceMethod · 0.95
storeLoadedValueMethod · 0.95

Calls 7

recordWriteMethod · 0.95
getValueReferenceMethod · 0.65
weighMethod · 0.65
setValueReferenceMethod · 0.65
notifyNewValueMethod · 0.65
checkStateMethod · 0.45
referenceValueMethod · 0.45

Tested by

no test coverage detected