Searched refs:CacheValue (Results 1 - 13 of 13) sorted by relevance
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/impl/ |
H A D | CacheTest.java | 17 import ohos.global.icu.impl.CacheValue; 18 import ohos.global.icu.impl.CacheValue.Strength; 26 /** Code coverage for CacheValue. */ 29 CacheValue<Object> nv = CacheValue.getInstance(null); in testNullCacheValue() 30 assertTrue("null CacheValue isNull()", nv.isNull()); in testNullCacheValue() 31 assertTrue("null CacheValue get()==null", nv.get() == null); in testNullCacheValue() 32 assertTrue("null CacheValue reset==null", nv.resetIfCleared(null) == null); in testNullCacheValue() 35 fail("null CacheValue reset(not null) should throw an Exception, returned " + in testNullCacheValue() 41 /** Code coverage for CacheValue [all...] |
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/impl/ |
H A D | CacheTest.java | 16 import com.ibm.icu.impl.CacheValue; 17 import com.ibm.icu.impl.CacheValue.Strength; 23 /** Code coverage for CacheValue. */ 26 CacheValue<Object> nv = CacheValue.getInstance(null); in testNullCacheValue() 27 assertTrue("null CacheValue isNull()", nv.isNull()); in testNullCacheValue() 28 assertTrue("null CacheValue get()==null", nv.get() == null); in testNullCacheValue() 29 assertTrue("null CacheValue reset==null", nv.resetIfCleared(null) == null); in testNullCacheValue() 32 fail("null CacheValue reset(not null) should throw an Exception, returned " + in testNullCacheValue() 38 /** Code coverage for CacheValue [all...] |
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
H A D | SoftCache.java | 15 * in {@link java.lang.ref.Reference}s via {@link CacheValue}s. 20 * <p>When caching instances while the CacheValue "strength" is {@code SOFT}, 23 * the getInstance() method will call createInstance() again and reset the CacheValue. 30 * @param <V> Cache instance value type (must not be a CacheValue) 45 // We use a CacheValue (a second level of indirection) because in getInstance() 51 if(!(mapValue instanceof CacheValue)) { in getInstance() 55 CacheValue<V> cv = (CacheValue<V>)mapValue; in getInstance() 70 mapValue = (value != null && CacheValue.futureInstancesWillBeStrong()) ? in getInstance() 71 value : CacheValue in getInstance() [all...] |
H A D | CacheValue.java | 34 public abstract class CacheValue<V> { class 36 * "Strength" of holding a value in CacheValue instances. 54 private static final CacheValue NULL_VALUE = new NullValue(); 59 public static void setStrength(Strength strength) { CacheValue.strength = strength; } in setStrength() 67 * Returns a CacheValue instance that holds the value. 72 public static <V> CacheValue<V> getInstance(V value) { in getInstance() 103 private static final class NullValue<V> extends CacheValue<V> { 117 private static final class StrongValue<V> extends CacheValue<V> { 131 private static final class SoftValue<V> extends CacheValue<V> {
|
H A D | ICUResourceBundleImpl.java | 115 CacheValue.futureInstancesWillBeStrong()) { in ResourceString()
|
H A D | ICUResourceBundleReader.java | 1163 return size < LARGE_SIZE || CacheValue.futureInstancesWillBeStrong(); in storeDirectly() 1172 // but the CacheValue "strength" may change over time. in putIfCleared() 1181 values[index] = CacheValue.futureInstancesWillBeStrong() ? in putIfCleared()
|
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/ |
H A D | SoftCache.java | 16 * in {@link java.lang.ref.Reference}s via {@link CacheValue}s. 21 * <p>When caching instances while the CacheValue "strength" is {@code SOFT}, 24 * the getInstance() method will call createInstance() again and reset the CacheValue. 31 * @param <V> Cache instance value type (must not be a CacheValue) 47 // We use a CacheValue (a second level of indirection) because in getInstance() 53 if(!(mapValue instanceof CacheValue)) { in getInstance() 57 CacheValue<V> cv = (CacheValue<V>)mapValue; in getInstance() 72 mapValue = (value != null && CacheValue.futureInstancesWillBeStrong()) ? in getInstance() 73 value : CacheValue in getInstance() [all...] |
H A D | CacheValue.java | 36 public abstract class CacheValue<V> { class 38 * "Strength" of holding a value in CacheValue instances. 57 private static final CacheValue NULL_VALUE = new NullValue(); 62 public static void setStrength(Strength strength) { CacheValue.strength = strength; } in setStrength() 70 * Returns a CacheValue instance that holds the value. 75 public static <V> CacheValue<V> getInstance(V value) { in getInstance() 106 private static final class NullValue<V> extends CacheValue<V> { 120 private static final class StrongValue<V> extends CacheValue<V> { 134 private static final class SoftValue<V> extends CacheValue<V> {
|
H A D | ICUResourceBundleImpl.java | 116 CacheValue.futureInstancesWillBeStrong()) { in ResourceString()
|
H A D | ICUResourceBundleReader.java | 1165 return size < LARGE_SIZE || CacheValue.futureInstancesWillBeStrong(); in storeDirectly() 1174 // but the CacheValue "strength" may change over time. in putIfCleared() 1183 values[index] = CacheValue.futureInstancesWillBeStrong() ? in putIfCleared()
|
/third_party/skia/src/gpu/ |
H A D | GrDDLContext.cpp | 69 typedef const GrProgramInfo* CacheValue; typedef in final::ProgramInfoMap 82 const CacheValue* preExisting = fMap.find(desc); in add() 91 fMap.foreach([dst](CacheKey* programDesc, CacheValue* programInfo) { in toArray() 106 SkLRUCache<CacheKey, CacheValue, DescHash> fMap;
|
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
H A D | BreakIterator.java | 18 import com.ibm.icu.impl.CacheValue; 591 private static final CacheValue<?>[] iterCache = new CacheValue<?>[5]; 905 iterCache[kind] = CacheValue.getInstance(cache); in getBreakInstance()
|
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/ |
H A D | BreakIterator.java | 19 import ohos.global.icu.impl.CacheValue; 557 private static final CacheValue<?>[] iterCache = new CacheValue<?>[5]; 860 iterCache[kind] = CacheValue.getInstance(cache); in getBreakInstance()
|
Completed in 12 milliseconds