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

Method softValues

output/java_guava/1.4.13/CacheBuilder.java:595–598  ·  view source on GitHub ↗

Specifies that each value (not key) stored in the cache should be wrapped in a SoftReference (by default, strong references are used). Softly-referenced objects will be garbage-collected in a globally least-recently-used manner, in response to memory demand. Warning: in mos

()

Source from the content-addressed store, hash-verified

593 */
594
595 @GwtIncompatible // java.lang.ref.SoftReference
596 public CacheBuilder<K, V> softValues() {
597 return setValueStrength(Strength.SOFT);
598 }
599
600 CacheBuilder<K, V> setValueStrength(Strength strength) {
601 checkState(valueStrength == null, "Value strength was already set to %s", valueStrength);

Callers 1

toCacheBuilderMethod · 0.45

Calls 1

setValueStrengthMethod · 0.95

Tested by

no test coverage detected