/external/guava/guava-tests/test/com/google/common/cache/ |
D | CacheBuilderTest.java | 57 CacheBuilder.newBuilder().removalListener(countingRemovalListener()).build(loader); in testNewBuilder() 64 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder(); in testInitialCapacity_negative() 73 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().initialCapacity(16); in testInitialCapacity_setTwice() 84 LoadingCache<?, ?> cache = CacheBuilder.newBuilder().initialCapacity(5).build(identityLoader()); in testInitialCapacity_small() 96 LoadingCache<?, ?> cache = CacheBuilder.newBuilder().initialCapacity(0).build(identityLoader()); in testInitialCapacity_smallest() 108 CacheBuilder.newBuilder().initialCapacity(Integer.MAX_VALUE); in testInitialCapacity_large() 114 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder(); in testConcurrencyLevel_zero() 123 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().concurrencyLevel(16); in testConcurrencyLevel_setTwice() 135 CacheBuilder.newBuilder().concurrencyLevel(1).build(identityLoader()); in testConcurrencyLevel_small() 141 CacheBuilder.newBuilder().concurrencyLevel(Integer.MAX_VALUE); in testConcurrencyLevel_large() [all …]
|
D | CacheBuilderSpecTest.java | 45 assertCacheBuilderEquivalence(CacheBuilder.newBuilder(), CacheBuilder.from(spec)); in testParse_empty() 59 CacheBuilder.newBuilder().initialCapacity(10), CacheBuilder.from(spec)); in testParse_initialCapacity() 80 CacheBuilder.newBuilder().maximumSize(9000), CacheBuilder.from(spec)); in testParse_maximumSize() 101 CacheBuilder.newBuilder().maximumWeight(9000), CacheBuilder.from(spec)); in testParse_maximumWeight() 131 CacheBuilder.newBuilder().concurrencyLevel(32), CacheBuilder.from(spec)); in testParse_concurrencyLevel() 152 assertCacheBuilderEquivalence(CacheBuilder.newBuilder().weakKeys(), CacheBuilder.from(spec)); in testParse_weakKeys() 181 assertCacheBuilderEquivalence(CacheBuilder.newBuilder().softValues(), CacheBuilder.from(spec)); in testParse_softValues() 202 assertCacheBuilderEquivalence(CacheBuilder.newBuilder().weakValues(), CacheBuilder.from(spec)); in testParse_weakValues() 251 CacheBuilder.newBuilder().expireAfterWrite(10L, TimeUnit.DAYS), CacheBuilder.from(spec)); in testParse_writeExpirationDays() 259 CacheBuilder.newBuilder().expireAfterWrite(150L, TimeUnit.HOURS), CacheBuilder.from(spec)); in testParse_writeExpirationHours() [all …]
|
D | CacheBuilderGwtTest.java | 54 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build(); in testLoader() 81 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().maximumSize(4).build(); in testSizeConstraint() 115 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder().build(loader); in testLoadingCache() 133 CacheBuilder.newBuilder() in testExpireAfterAccess() 151 CacheBuilder.newBuilder() in testExpireAfterWrite() 179 CacheBuilder.newBuilder() in testExpireAfterWriteAndAccess() 210 Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build(); in testMapMethods() 278 CacheBuilder.newBuilder() in testRemovalListener() 317 Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build(); in testPutAll() 334 Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build(); in testInvalidate() [all …]
|
D | CacheEvictionTest.java | 44 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().maximumSize(i).build(loader); in testEviction_setMaxSegmentSize() 53 CacheBuilder.newBuilder().maximumWeight(i).weigher(constantWeigher(1)).build(loader); in testEviction_setMaxSegmentWeight() 61 CacheBuilder.newBuilder().concurrencyLevel(1).maximumSize(MAX_SIZE).build(loader); in testEviction_maxSizeOneSegment() 74 CacheBuilder.newBuilder() in testEviction_maxWeightOneSegment() 92 CacheBuilder.newBuilder() in testEviction_maxSize() 112 CacheBuilder.newBuilder() in testEviction_maxWeight() 147 CacheBuilder.newBuilder() in testEviction_maxWeight_zero() 196 CacheBuilder.newBuilder() in testEviction_maxWeight_entryTooBig() 246 CacheBuilder.newBuilder() in testEviction_overflow() 261 CacheBuilder.newBuilder().maximumSize(MAX_SIZE).build(loader); in testUpdateRecency_onGet() [all …]
|
D | PackageSanityTests.java | 37 setDefault(LocalCache.class, new LocalCache<Object, Object>(CacheBuilder.newBuilder(), null)); in PackageSanityTests() 38 setDefault(CacheBuilder.class, CacheBuilder.newBuilder()); in PackageSanityTests()
|
D | LocalLoadingCacheTest.java | 19 import static com.google.common.cache.CacheBuilder.EMPTY_STATS; 42 CacheBuilder<K, V> builder, CacheLoader<? super K, V> loader) { in makeCache() 46 private CacheBuilder<Object, Object> createCacheBuilder() { in createCacheBuilder() 47 return CacheBuilder.newBuilder().recordStats(); in createCacheBuilder() 75 CacheBuilder<Object, Object> builder = createCacheBuilder().concurrencyLevel(1).maximumSize(2); in testStats() 133 CacheBuilder<Object, Object> builder = createCacheBuilder().concurrencyLevel(1); in testStatsNoops() 175 CacheBuilder<Object, Object> builder = in testNoStats() 176 CacheBuilder.newBuilder().concurrencyLevel(1).maximumSize(2); in testNoStats() 197 CacheBuilder<Object, Object> builder = in testRecordStats() 226 CacheBuilder<Object, Object> builder = createCacheBuilder(); in testAsMap() [all …]
|
D | NullCacheTest.java | 45 CacheBuilder.newBuilder() in testGet() 63 CacheBuilder.newBuilder() in testGet_expireAfterWrite() 81 CacheBuilder.newBuilder() in testGet_expireAfterAccess() 98 CacheBuilder.newBuilder() in testGet_computeNull() 117 CacheBuilder.newBuilder() in testGet_runtimeException()
|
D | CacheExpirationTest.java | 54 CacheBuilder.newBuilder() in testExpiration_expireAfterWrite() 67 CacheBuilder.newBuilder() in testExpiration_expireAfterAccess() 106 CacheBuilder.newBuilder() in testExpiringGet_expireAfterWrite() 119 CacheBuilder.newBuilder() in testExpiringGet_expireAfterAccess() 204 CacheBuilder.newBuilder() in testRemovalListener_expireAfterWrite() 226 CacheBuilder.newBuilder() in testRemovalScheduler_expireAfterWrite() 239 CacheBuilder.newBuilder() in testRemovalScheduler_expireAfterAccess() 252 CacheBuilder.newBuilder() in testRemovalScheduler_expireAfterBoth() 266 CacheBuilder.newBuilder() in testExpirationOrder_access() 319 CacheBuilder.newBuilder() in testExpirationOrder_write() [all …]
|
D | CacheLoadingTest.java | 103 CacheBuilder.newBuilder().recordStats().build(identityLoader()); in testLoad() 176 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().recordStats().build(loader); in testReload() 225 CacheBuilder.newBuilder() in testRefresh() 287 CacheBuilder.newBuilder() in testRefresh_getIfPresent() 333 CacheBuilder.newBuilder() in testBulkLoad_default() 381 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder().recordStats().build(loader); in testBulkLoad_loadAll() 444 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().build(loader); in testBulkLoad_extra() 480 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().build(loader); in testBulkLoad_clobber() 519 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().build(loader); in testBulkLoad_clobberNullValue() 559 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().build(loader); in testBulkLoad_clobberNullKey() [all …]
|
D | CacheBuilderFactory.java | 90 Iterable<CacheBuilder<Object, Object>> buildAllPermutations() { in buildAllPermutations() 104 new Function<List<Object>, CacheBuilder<Object, Object>>() { in buildAllPermutations() 106 public CacheBuilder<Object, Object> apply(List<Object> combination) { in buildAllPermutations() 160 private CacheBuilder<Object, Object> createCacheBuilder( 170 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder();
|
D | LocalCacheMapComputeTest.java | 42 CacheBuilder.newBuilder() in setUp() 61 Cache<String, String> c = CacheBuilder.newBuilder().maximumSize(1).build(); in testComputeIfAbsentEviction() 73 Cache<String, String> c = CacheBuilder.newBuilder().maximumSize(1).build(); in testComputeEviction()
|
/external/guava/android/guava-tests/test/com/google/common/cache/ |
D | CacheBuilderTest.java | 57 CacheBuilder.newBuilder().removalListener(countingRemovalListener()).build(loader); in testNewBuilder() 64 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder(); in testInitialCapacity_negative() 73 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().initialCapacity(16); in testInitialCapacity_setTwice() 84 LoadingCache<?, ?> cache = CacheBuilder.newBuilder().initialCapacity(5).build(identityLoader()); in testInitialCapacity_small() 96 LoadingCache<?, ?> cache = CacheBuilder.newBuilder().initialCapacity(0).build(identityLoader()); in testInitialCapacity_smallest() 108 CacheBuilder.newBuilder().initialCapacity(Integer.MAX_VALUE); in testInitialCapacity_large() 114 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder(); in testConcurrencyLevel_zero() 123 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().concurrencyLevel(16); in testConcurrencyLevel_setTwice() 135 CacheBuilder.newBuilder().concurrencyLevel(1).build(identityLoader()); in testConcurrencyLevel_small() 141 CacheBuilder.newBuilder().concurrencyLevel(Integer.MAX_VALUE); in testConcurrencyLevel_large() [all …]
|
D | CacheBuilderSpecTest.java | 45 assertCacheBuilderEquivalence(CacheBuilder.newBuilder(), CacheBuilder.from(spec)); in testParse_empty() 59 CacheBuilder.newBuilder().initialCapacity(10), CacheBuilder.from(spec)); in testParse_initialCapacity() 80 CacheBuilder.newBuilder().maximumSize(9000), CacheBuilder.from(spec)); in testParse_maximumSize() 101 CacheBuilder.newBuilder().maximumWeight(9000), CacheBuilder.from(spec)); in testParse_maximumWeight() 131 CacheBuilder.newBuilder().concurrencyLevel(32), CacheBuilder.from(spec)); in testParse_concurrencyLevel() 152 assertCacheBuilderEquivalence(CacheBuilder.newBuilder().weakKeys(), CacheBuilder.from(spec)); in testParse_weakKeys() 181 assertCacheBuilderEquivalence(CacheBuilder.newBuilder().softValues(), CacheBuilder.from(spec)); in testParse_softValues() 202 assertCacheBuilderEquivalence(CacheBuilder.newBuilder().weakValues(), CacheBuilder.from(spec)); in testParse_weakValues() 251 CacheBuilder.newBuilder().expireAfterWrite(10L, TimeUnit.DAYS), CacheBuilder.from(spec)); in testParse_writeExpirationDays() 259 CacheBuilder.newBuilder().expireAfterWrite(150L, TimeUnit.HOURS), CacheBuilder.from(spec)); in testParse_writeExpirationHours() [all …]
|
D | CacheBuilderGwtTest.java | 54 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build(); in testLoader() 81 final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().maximumSize(4).build(); in testSizeConstraint() 115 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder().build(loader); in testLoadingCache() 133 CacheBuilder.newBuilder() in testExpireAfterAccess() 151 CacheBuilder.newBuilder() in testExpireAfterWrite() 179 CacheBuilder.newBuilder() in testExpireAfterWriteAndAccess() 210 Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build(); in testMapMethods() 278 CacheBuilder.newBuilder() in testRemovalListener() 317 Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build(); in testPutAll() 334 Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build(); in testInvalidate() [all …]
|
D | CacheEvictionTest.java | 44 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().maximumSize(i).build(loader); in testEviction_setMaxSegmentSize() 53 CacheBuilder.newBuilder().maximumWeight(i).weigher(constantWeigher(1)).build(loader); in testEviction_setMaxSegmentWeight() 61 CacheBuilder.newBuilder().concurrencyLevel(1).maximumSize(MAX_SIZE).build(loader); in testEviction_maxSizeOneSegment() 74 CacheBuilder.newBuilder() in testEviction_maxWeightOneSegment() 92 CacheBuilder.newBuilder() in testEviction_maxSize() 112 CacheBuilder.newBuilder() in testEviction_maxWeight() 147 CacheBuilder.newBuilder() in testEviction_maxWeight_zero() 196 CacheBuilder.newBuilder() in testEviction_maxWeight_entryTooBig() 246 CacheBuilder.newBuilder() in testEviction_overflow() 261 CacheBuilder.newBuilder().maximumSize(MAX_SIZE).build(loader); in testUpdateRecency_onGet() [all …]
|
D | PackageSanityTests.java | 37 setDefault(LocalCache.class, new LocalCache<Object, Object>(CacheBuilder.newBuilder(), null)); in PackageSanityTests() 38 setDefault(CacheBuilder.class, CacheBuilder.newBuilder()); in PackageSanityTests()
|
D | LocalLoadingCacheTest.java | 19 import static com.google.common.cache.CacheBuilder.EMPTY_STATS; 42 CacheBuilder<K, V> builder, CacheLoader<? super K, V> loader) { in makeCache() 46 private CacheBuilder<Object, Object> createCacheBuilder() { in createCacheBuilder() 47 return CacheBuilder.newBuilder().recordStats(); in createCacheBuilder() 75 CacheBuilder<Object, Object> builder = createCacheBuilder().concurrencyLevel(1).maximumSize(2); in testStats() 133 CacheBuilder<Object, Object> builder = createCacheBuilder().concurrencyLevel(1); in testStatsNoops() 175 CacheBuilder<Object, Object> builder = in testNoStats() 176 CacheBuilder.newBuilder().concurrencyLevel(1).maximumSize(2); in testNoStats() 197 CacheBuilder<Object, Object> builder = in testRecordStats() 226 CacheBuilder<Object, Object> builder = createCacheBuilder(); in testAsMap() [all …]
|
D | NullCacheTest.java | 45 CacheBuilder.newBuilder() in testGet() 63 CacheBuilder.newBuilder() in testGet_expireAfterWrite() 81 CacheBuilder.newBuilder() in testGet_expireAfterAccess() 98 CacheBuilder.newBuilder() in testGet_computeNull() 117 CacheBuilder.newBuilder() in testGet_runtimeException()
|
D | CacheExpirationTest.java | 54 CacheBuilder.newBuilder() in testExpiration_expireAfterWrite() 67 CacheBuilder.newBuilder() in testExpiration_expireAfterAccess() 106 CacheBuilder.newBuilder() in testExpiringGet_expireAfterWrite() 119 CacheBuilder.newBuilder() in testExpiringGet_expireAfterAccess() 204 CacheBuilder.newBuilder() in testRemovalListener_expireAfterWrite() 226 CacheBuilder.newBuilder() in testRemovalScheduler_expireAfterWrite() 239 CacheBuilder.newBuilder() in testRemovalScheduler_expireAfterAccess() 252 CacheBuilder.newBuilder() in testRemovalScheduler_expireAfterBoth() 266 CacheBuilder.newBuilder() in testExpirationOrder_access() 319 CacheBuilder.newBuilder() in testExpirationOrder_write() [all …]
|
D | CacheLoadingTest.java | 103 CacheBuilder.newBuilder().recordStats().build(identityLoader()); in testLoad() 176 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().recordStats().build(loader); in testReload() 225 CacheBuilder.newBuilder() in testRefresh() 287 CacheBuilder.newBuilder() in testRefresh_getIfPresent() 333 CacheBuilder.newBuilder() in testBulkLoad_default() 381 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder().recordStats().build(loader); in testBulkLoad_loadAll() 444 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().build(loader); in testBulkLoad_extra() 480 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().build(loader); in testBulkLoad_clobber() 519 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().build(loader); in testBulkLoad_clobberNullValue() 559 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().build(loader); in testBulkLoad_clobberNullKey() [all …]
|
D | CacheBuilderFactory.java | 90 Iterable<CacheBuilder<Object, Object>> buildAllPermutations() { in buildAllPermutations() 104 new Function<List<Object>, CacheBuilder<Object, Object>>() { in buildAllPermutations() 106 public CacheBuilder<Object, Object> apply(List<Object> combination) { in buildAllPermutations() 160 private CacheBuilder<Object, Object> createCacheBuilder( 170 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder();
|
/external/guava/guava/src/com/google/common/cache/ |
D | CacheBuilder.java | 154 public final class CacheBuilder<K, V> { class 223 private static final Logger logger = Logger.getLogger(CacheBuilder.class.getName()); 255 private CacheBuilder() {} in CacheBuilder() method in CacheBuilder 264 public static CacheBuilder<Object, Object> newBuilder() { in newBuilder() 265 return new CacheBuilder<>(); in newBuilder() 274 public static CacheBuilder<Object, Object> from(CacheBuilderSpec spec) { in from() 286 public static CacheBuilder<Object, Object> from(String spec) { in from() 296 CacheBuilder<K, V> lenientParsing() { in lenientParsing() 310 CacheBuilder<K, V> keyEquivalence(Equivalence<Object> equivalence) { in keyEquivalence() 330 CacheBuilder<K, V> valueEquivalence(Equivalence<Object> equivalence) { in valueEquivalence() [all …]
|
/external/guava/android/guava/src/com/google/common/cache/ |
D | CacheBuilder.java | 155 public final class CacheBuilder<K, V> { class 224 private static final Logger logger = Logger.getLogger(CacheBuilder.class.getName()); 256 private CacheBuilder() {} in CacheBuilder() method in CacheBuilder 265 public static CacheBuilder<Object, Object> newBuilder() { in newBuilder() 266 return new CacheBuilder<>(); in newBuilder() 275 public static CacheBuilder<Object, Object> from(CacheBuilderSpec spec) { in from() 287 public static CacheBuilder<Object, Object> from(String spec) { in from() 297 CacheBuilder<K, V> lenientParsing() { in lenientParsing() 311 CacheBuilder<K, V> keyEquivalence(Equivalence<Object> equivalence) { in keyEquivalence() 331 CacheBuilder<K, V> valueEquivalence(Equivalence<Object> equivalence) { in valueEquivalence() [all …]
|
/external/cldr/tools/java/org/unicode/cldr/util/ |
D | PatternCache.java | 8 import com.google.common.cache.CacheBuilder; 48 …cache = CacheBuilder.newBuilder().initialCapacity(INITIAL_CAPACITY).maximumSize(MAX_CAPACITY).reco… 50 …cache = CacheBuilder.newBuilder().initialCapacity(INITIAL_CAPACITY).maximumSize(MAX_CAPACITY).buil…
|
D | CoverageInfo.java | 10 import com.google.common.cache.CacheBuilder; 67 …private Cache<String, CoverageLevel2> localeToCoverageLevelInfo = CacheBuilder.newBuilder().maximu… 68 …private Cache<XPathWithLocation, Level> coverageCache = CacheBuilder.newBuilder().maximumSize(MAXL…
|