Searched refs:maximumWeight (Results 1 – 8 of 8) sorted by relevance
/external/guava/guava/src/com/google/common/cache/ |
D | CacheBuilder.java | 222 long maximumWeight = UNSET_INT; field in CacheBuilder 403 checkState(this.maximumWeight == UNSET_INT, "maximum weight was already set to %s", in maximumSize() 404 this.maximumWeight); in maximumSize() 436 public CacheBuilder<K, V> maximumWeight(long weight) { in maximumWeight() method in CacheBuilder 437 checkState(this.maximumWeight == UNSET_INT, "maximum weight was already set to %s", in maximumWeight() 438 this.maximumWeight); in maximumWeight() 441 this.maximumWeight = weight; in maximumWeight() 494 return (weigher == null) ? maximumSize : maximumWeight; in getMaximumWeight() 816 checkState(maximumWeight == UNSET_INT, "maximumWeight requires weigher"); in checkWeightWithWeigher() 819 checkState(maximumWeight != UNSET_INT, "weigher requires maximumWeight"); in checkWeightWithWeigher() [all …]
|
D | CacheBuilderSpec.java | 114 @VisibleForTesting Long maximumWeight; field in CacheBuilderSpec 178 if (maximumWeight != null) { in toCacheBuilder() 179 builder.maximumWeight(maximumWeight); in toCacheBuilder() 245 maximumWeight, in hashCode() 266 && Objects.equal(maximumWeight, that.maximumWeight) in equals() 335 checkArgument(spec.maximumWeight == null, in parseLong() 336 "maximum weight was already set to ", spec.maximumWeight); in parseLong() 345 checkArgument(spec.maximumWeight == null, in parseLong() 346 "maximum weight was already set to ", spec.maximumWeight); in parseLong() 349 spec.maximumWeight = value; in parseLong()
|
D | LocalCache.java | 4634 builder.maximumWeight(maxWeight);
|
/external/guava/guava-tests/test/com/google/common/cache/ |
D | CacheBuilderSpecTest.java | 41 assertNull(spec.maximumWeight); in testParse_empty() 54 assertNull(spec.maximumWeight); in testParse_initialCapacity() 98 assertEquals(9000, spec.maximumWeight.longValue()); in testParse_maximumWeight() 105 CacheBuilder.newBuilder().maximumWeight(9000), CacheBuilder.from(spec)); in testParse_maximumWeight() 130 assertNull(spec.maximumWeight); in testParse_concurrencyLevel() 153 assertNull(spec.maximumWeight); in testParse_weakKeys() 185 assertNull(spec.maximumWeight); in testParse_softValues() 208 assertNull(spec.maximumWeight); in testParse_weakValues() 261 assertNull(spec.maximumWeight); in testParse_writeExpirationDays() 310 assertNull(spec.maximumWeight); in testParse_accessExpirationDays() [all …]
|
D | CacheEvictionTest.java | 57 .maximumWeight(i) in testEviction_setMaxSegmentWeight() 83 .maximumWeight(2 * MAX_SIZE) in testEviction_maxWeightOneSegment() 118 .maximumWeight(2 * MAX_SIZE) in testEviction_maxWeight() 139 .maximumWeight(1L << 31) in testEviction_overflow() 215 .maximumWeight(45) in testEviction_weightedLru() 258 .maximumWeight(45) in testEviction_overweight()
|
D | CacheBuilderTest.java | 170 builder.maximumWeight(16); in testMaximumSize_andWeight() 179 builder.maximumWeight(-1); in testMaximumWeight_negative() 186 CacheBuilder<Object, Object> builder = new CacheBuilder<Object, Object>().maximumWeight(16); in testMaximumWeight_setTwice() 189 builder.maximumWeight(16); in testMaximumWeight_setTwice() 201 .maximumWeight(1); in testMaximumWeight_withoutWeigher()
|
D | LocalCacheTest.java | 324 .maximumWeight(maxSize) in checkMaximumSize() 343 makeLocalCache(createCacheBuilder().maximumWeight(1).weigher(testWeigher)); in testSetWeigher() 2400 .maximumWeight(789) in testSerializationProxyLoading() 2455 .maximumWeight(789) in testSerializationProxyManual()
|
/external/guava/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/ |
D | CacheBuilder.java | 216 long maximumWeight = UNSET_INT; field in CacheBuilder 335 checkState(this.maximumWeight == UNSET_INT, "maximum weight was already set to %s", in maximumSize() 336 this.maximumWeight); in maximumSize() 347 return (weigher == null) ? maximumSize : maximumWeight; in getMaximumWeight() 571 checkState(maximumWeight == UNSET_INT, "maximumWeight requires weigher"); in checkWeightWithWeigher() 574 checkState(maximumWeight != UNSET_INT, "weigher requires maximumWeight"); in checkWeightWithWeigher() 576 if (maximumWeight == UNSET_INT) { in checkWeightWithWeigher() 599 if (maximumWeight != UNSET_INT) { in toString() 600 s.add("maximumWeight", maximumWeight); in toString()
|