Home
last modified time | relevance | path

Searched refs:maximumSize (Results 1 – 25 of 37) sorted by relevance

12

/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
DMapMaker.java43 private final int maximumSize; field in MapMaker.ExpiringComputingMap
46 long expirationMillis, int maximumSize, int initialCapacity) { in ExpiringComputingMap() argument
47 this(expirationMillis, null, maximumSize, initialCapacity); in ExpiringComputingMap()
51 int maximumSize, int initialCapacity) { in ExpiringComputingMap() argument
52 super(initialCapacity, /* ignored loadFactor */ 0.75f, (maximumSize != -1)); in ExpiringComputingMap()
55 this.maximumSize = maximumSize; in ExpiringComputingMap()
69 return (maximumSize == -1) ? false : size() > maximumSize; in removeEldestEntry()
163 private int maximumSize = -1; field in MapMaker
192 MapMaker maximumSize(int maximumSize) { in maximumSize() method in MapMaker
193 if (this.maximumSize != -1) { in maximumSize()
[all …]
DGenericMapMaker.java60 abstract GenericMapMaker<K0, V0> maximumSize(int maximumSize); in maximumSize() method in GenericMapMaker
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/
DAbstractSessionContext.java40 private volatile int maximumSize; field in AbstractSessionContext
53 if (maximumSize > 0 && size() > maximumSize) {
67 AbstractSessionContext(int maximumSize) { in AbstractSessionContext() argument
68 this.maximumSize = maximumSize; in AbstractSessionContext()
136 return maximumSize; in getSessionCacheSize()
182 int oldMaximum = maximumSize; in setSessionCacheSize()
183 maximumSize = size; in setSessionCacheSize()
294 if (size > maximumSize) { in trimToSize()
295 int removals = size - maximumSize; in trimToSize()
/external/conscrypt/common/src/main/java/org/conscrypt/
DAbstractSessionContext.java39 private volatile int maximumSize; field in AbstractSessionContext
52 if (maximumSize > 0 && size() > maximumSize) {
66 AbstractSessionContext(int maximumSize) { in AbstractSessionContext() argument
67 this.maximumSize = maximumSize; in AbstractSessionContext()
135 return maximumSize; in getSessionCacheSize()
181 int oldMaximum = maximumSize; in setSessionCacheSize()
182 maximumSize = size; in setSessionCacheSize()
293 if (size > maximumSize) { in trimToSize()
294 int removals = size - maximumSize; in trimToSize()
/external/guava/guava/src/com/google/common/collect/
DMinMaxPriorityQueue.java136 public static Builder<Comparable> maximumSize(int maximumSize) { in maximumSize() method in MinMaxPriorityQueue
138 .maximumSize(maximumSize); in maximumSize()
164 private int maximumSize = Integer.MAX_VALUE; field in MinMaxPriorityQueue.Builder
186 public Builder<B> maximumSize(int maximumSize) { in maximumSize() argument
187 checkArgument(maximumSize > 0); in maximumSize()
188 this.maximumSize = maximumSize; in maximumSize()
207 this, initialQueueSize(expectedSize, maximumSize, initialContents)); in create()
222 @VisibleForTesting final int maximumSize; field in MinMaxPriorityQueue
234 this.maximumSize = builder.maximumSize; in MinMaxPriorityQueue()
281 return size <= maximumSize || pollLast() != element; in offer()
[all …]
DMapMaker.java118 int maximumSize = UNSET_INT; field in MapMaker
206 MapMaker maximumSize(int size) { in maximumSize() method in MapMaker
207 checkState(this.maximumSize == UNSET_INT, "maximum size was already set to %s", in maximumSize()
208 this.maximumSize); in maximumSize()
210 this.maximumSize = size; in maximumSize()
212 if (maximumSize == 0) { in maximumSize()
603 if (maximumSize != UNSET_INT) { in toString()
604 s.add("maximumSize", maximumSize); in toString()
DGenericMapMaker.java80 abstract GenericMapMaker<K0, V0> maximumSize(int maximumSize); in maximumSize() method in GenericMapMaker
/external/guava/guava-tests/test/com/google/common/cache/
DCacheBuilderSpecTest.java40 assertNull(spec.maximumSize); in testParse_empty()
53 assertNull(spec.maximumSize); in testParse_initialCapacity()
76 assertEquals(9000, spec.maximumSize.longValue()); in testParse_maximumSize()
83 CacheBuilder.newBuilder().maximumSize(9000), CacheBuilder.from(spec)); in testParse_maximumSize()
129 assertNull(spec.maximumSize); in testParse_concurrencyLevel()
152 assertNull(spec.maximumSize); in testParse_weakKeys()
184 assertNull(spec.maximumSize); in testParse_softValues()
207 assertNull(spec.maximumSize); in testParse_weakValues()
260 assertNull(spec.maximumSize); in testParse_writeExpirationDays()
309 assertNull(spec.maximumSize); in testParse_accessExpirationDays()
[all …]
DCacheEvictionTest.java47 .maximumSize(i) in testEviction_setMaxSegmentSize()
68 .maximumSize(MAX_SIZE) in testEviction_maxSizeOneSegment()
99 .maximumSize(MAX_SIZE) in testEviction_maxSize()
152 CacheBuilder.newBuilder().maximumSize(MAX_SIZE).build(loader); in testUpdateRecency_onGet()
165 .maximumSize(MAX_SIZE) in testUpdateRecency_onInvalidate()
183 .maximumSize(10) in testEviction_lru()
281 .maximumSize(10) in testEviction_invalidateAll()
DCacheBuilderTest.java152 builder.maximumSize(-1); in testMaximumSize_negative()
158 CacheBuilder<Object, Object> builder = new CacheBuilder<Object, Object>().maximumSize(16); in testMaximumSize_setTwice()
161 builder.maximumSize(16); in testMaximumSize_setTwice()
168 CacheBuilder<Object, Object> builder = new CacheBuilder<Object, Object>().maximumSize(16); in testMaximumSize_andWeight()
193 builder.maximumSize(16); in testMaximumWeight_setTwice()
223 .maximumSize(1); in testWeigher_withMaximumSize()
228 .maximumSize(1) in testWeigher_withMaximumSize()
370 .maximumSize(0) in testNullCache()
562 .maximumSize(5000) in testRemovalNotification_get_basher()
DNullCacheTest.java45 .maximumSize(0) in testGet()
95 .maximumSize(0) in testGet_computeNull()
111 .maximumSize(0) in testGet_runtimeException()
DCacheBuilderFactory.java151 Integer concurrencyLevel, Integer initialCapacity, Integer maximumSize,
162 if (maximumSize != null) {
163 builder.maximumSize(maximumSize);
/external/guava/guava/src/com/google/common/cache/
DCacheBuilder.java221 long maximumSize = UNSET_INT; field in CacheBuilder
400 public CacheBuilder<K, V> maximumSize(long size) { in maximumSize() method in CacheBuilder
401 checkState(this.maximumSize == UNSET_INT, "maximum size was already set to %s", in maximumSize()
402 this.maximumSize); in maximumSize()
407 this.maximumSize = size; in maximumSize()
439 checkState(this.maximumSize == UNSET_INT, "maximum size was already set to %s", in maximumWeight()
440 this.maximumSize); in maximumWeight()
479 checkState(this.maximumSize == UNSET_INT, "weigher can not be combined with maximum size", in weigher()
480 this.maximumSize); in weigher()
494 return (weigher == null) ? maximumSize : maximumWeight; in getMaximumWeight()
[all …]
DCacheBuilderSpec.java113 @VisibleForTesting Long maximumSize; field in CacheBuilderSpec
175 if (maximumSize != null) { in toCacheBuilder()
176 builder.maximumSize(maximumSize); in toCacheBuilder()
244 maximumSize, in hashCode()
265 && Objects.equal(maximumSize, that.maximumSize) in equals()
333 checkArgument(spec.maximumSize == null, in parseLong()
334 "maximum size was already set to ", spec.maximumSize); in parseLong()
337 spec.maximumSize = value; in parseLong()
347 checkArgument(spec.maximumSize == null, in parseLong()
348 "maximum size was already set to ", spec.maximumSize); in parseLong()
/external/guava/guava-tests/benchmark/com/google/common/cache/
DLoadingCacheSingleThreadBenchmark.java34 @Param({"1000", "2000"}) int maximumSize; field in LoadingCacheSingleThreadBenchmark
58 .maximumSize(maximumSize) in setUp()
70 while (cache.getUnchecked(nextRandomKey()) < maximumSize) {} in setUp()
/external/guava/guava-tests/benchmark/com/google/common/collect/
DMapMakerSingleThreadBenchmark.java37 @Param({"1000", "2000"}) int maximumSize; field in MapMakerSingleThreadBenchmark
61 .maximumSize(maximumSize) in setUp()
73 while (cache.get(nextRandomKey()) < maximumSize) {} in setUp()
/external/guava/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/
DCacheBuilder.java215 long maximumSize = UNSET_INT; field in CacheBuilder
332 public CacheBuilder<K, V> maximumSize(long size) { in maximumSize() method in CacheBuilder
333 checkState(this.maximumSize == UNSET_INT, "maximum size was already set to %s", in maximumSize()
334 this.maximumSize); in maximumSize()
339 this.maximumSize = size; in maximumSize()
347 return (weigher == null) ? maximumSize : maximumWeight; in getMaximumWeight()
596 if (maximumSize != UNSET_INT) { in toString()
597 s.add("maximumSize", maximumSize); in toString()
DLocalCache.java72 final long maximumSize = builder.maximumSize; in LocalCache() local
76 (builder.maximumSize != UNSET_INT), in LocalCache()
77 builder.maximumSize, in LocalCache()
471 private final long maximumSize; field in LocalCache.CapacityEnforcingLinkedHashMap
477 long maximumSize, in CapacityEnforcingLinkedHashMap() argument
481 this.maximumSize = maximumSize; in CapacityEnforcingLinkedHashMap()
488 boolean removal = (maximumSize == UNSET_INT) ? false : (size() > maximumSize); in removeEldestEntry()
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
DMapMakerTest.java77 MapMaker maker = new MapMaker().maximumSize(16); in testMaximumSize_setTwice()
80 maker.maximumSize(16); in testMaximumSize_setTwice()
98 new MapMaker().maximumSize(0).makeMap(); in testPut_sizeIsZero()
108 new MapMaker().maximumSize(mapSize).makeMap(); in testSizeBasedEviction()
/external/guava/guava-gwt/test-super/com/google/common/cache/super/com/google/common/cache/
DCacheBuilderTest.java96 builder.maximumSize(-1); in testMaximumSize_negative()
102 CacheBuilder<Object, Object> builder = new CacheBuilder<Object, Object>().maximumSize(16); in testMaximumSize_setTwice()
105 builder.maximumSize(16); in testMaximumSize_setTwice()
/external/guava/guava-tests/test/com/google/common/collect/
DMinMaxPriorityQueueTest.java90 .maximumSize(42) in testCreation_maximumSize()
93 assertEquals(42, queue.maximumSize); in testCreation_maximumSize()
100 .maximumSize(42) in testCreation_comparator_maximumSize()
103 assertEquals(42, queue.maximumSize); in testCreation_comparator_maximumSize()
110 .maximumSize(42) in testCreation_expectedSize_maximumSize()
113 assertEquals(42, queue.maximumSize); in testCreation_expectedSize_maximumSize()
151 .maximumSize(42) in testCreation_maximumSize_withContents()
155 assertEquals(42, queue.maximumSize); in testCreation_maximumSize_withContents()
165 .maximumSize(42) in testCreation_allOptions()
169 assertEquals(42, queue.maximumSize); in testCreation_allOptions()
[all …]
DMapMakerTest.java235 MapMaker maker = new MapMaker().maximumSize(16); in testMaximumSize_setTwice()
238 maker.maximumSize(16); in testMaximumSize_setTwice()
256 new MapMaker().maximumSize(0).makeMap(); in testPut_sizeIsZero()
266 new MapMaker().maximumSize(mapSize).makeMap(); in testSizeBasedEviction()
/external/cldr/tools/java/org/unicode/cldr/util/
DPatternCache.java48 …cache = CacheBuilder.newBuilder().initialCapacity(INITIAL_CAPACITY).maximumSize(MAX_CAPACITY).reco…
50 …cache = CacheBuilder.newBuilder().initialCapacity(INITIAL_CAPACITY).maximumSize(MAX_CAPACITY).buil…
DCoverageInfo.java65 … CoverageLevel2> localeToCoverageLevelInfo = CacheBuilder.newBuilder().maximumSize(MAXLOCALES).bui…
66 …private Cache<XPathWithLocation, Level> coverageCache = CacheBuilder.newBuilder().maximumSize(MAXL…
DSimpleFactory.java331 factoryCache = CacheBuilder.newBuilder().maximumSize(FACTORY_CACHE_LIMIT).build(); in make()
338 … factoryLookupMap = CacheBuilder.newBuilder().maximumSize(FACTORY_CACHE_LIMIT).build(); in make()
388 factoryCache = CacheBuilder.newBuilder().maximumSize(FACTORY_CACHE_LIMIT).build(); in make()
393 … factoryLookupMap = CacheBuilder.newBuilder().maximumSize(FACTORY_CACHE_LIMIT).build(); in make()
432 combinedCache = CacheBuilder.newBuilder().maximumSize(CACHE_LIMIT).build(); in SimpleFactory()

12