Home | History | Annotate | Download | only in impl

Lines Matching full:strength

19  * depending on the current "strength" when {@code getInstance()} was called.
36 * "Strength" of holding a value in CacheValue instances.
37 * The default strength is {@code SOFT}.
39 public enum Strength {
51 private static volatile Strength strength = Strength.SOFT;
57 * Changes the "strength" of value references for subsequent {@code getInstance()} calls.
59 public static void setStrength(Strength strength) { CacheValue.strength = strength; }
62 * Returns true if the "strength" is set to {@code STRONG}.
64 public static boolean futureInstancesWillBeStrong() { return strength == Strength.STRONG; }
68 * It holds it directly if the value is null or if the current "strength" is {@code STRONG}.
76 return strength == Strength.STRONG ? new StrongValue<V>(value) : new SoftValue<V>(value);