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
()
| 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); |
no test coverage detected