Searched refs:constantWeigher (Results 1 – 10 of 10) sorted by relevance
19 import static com.google.common.cache.TestingWeighers.constantWeigher;53 CacheBuilder.newBuilder().maximumWeight(i).weigher(constantWeigher(1)).build(loader); in testEviction_setMaxSegmentWeight()77 .weigher(constantWeigher(2)) in testEviction_maxWeightOneSegment()114 .weigher(constantWeigher(2)) in testEviction_maxWeight()249 .weigher(constantWeigher(Integer.MAX_VALUE)) in testEviction_overflow()
25 static Weigher<Object, Object> constantWeigher(int constant) { in constantWeigher() method in TestingWeighers
24 import static com.google.common.cache.TestingWeighers.constantWeigher;220 CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().weigher(constantWeigher(42)); in testWeigher_withoutMaximumWeight()231 CacheBuilder.newBuilder().weigher(constantWeigher(42)).maximumSize(1); in testWeigher_withMaximumSize()236 CacheBuilder.newBuilder().maximumSize(1).weigher(constantWeigher(42)); in testWeigher_withMaximumSize()
20 import static com.google.common.cache.TestingWeighers.constantWeigher;473 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumWeight_withWeigher()487 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumSize_withWeigher()
27 import static com.google.common.cache.TestingWeighers.constantWeigher;443 .weigher(constantWeigher(1))); in checkMaximumSize()
27 import static com.google.common.cache.TestingWeighers.constantWeigher;440 .weigher(constantWeigher(1))); in checkMaximumSize()