Home
last modified time | relevance | path

Searched refs:maximumSize (Results 1 – 25 of 31) 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() argument
/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()
174 int oldMaximum = maximumSize; in setSessionCacheSize()
175 maximumSize = size; in setSessionCacheSize()
261 if (size > maximumSize) { in trimToSize()
262 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() argument
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() argument
DComputingConcurrentHashMap.java383 valueEquivalence, expireAfterWriteNanos, expireAfterAccessNanos, maximumSize, in writeReplace()
393 long expireAfterWriteNanos, long expireAfterAccessNanos, int maximumSize, in ComputingSerializationProxy() argument
397 expireAfterAccessNanos, maximumSize, concurrencyLevel, removalListener, delegate); in ComputingSerializationProxy()
DMapMakerInternalMap.java168 final int maximumSize; field in MapMakerInternalMap
204 maximumSize = builder.maximumSize; in MapMakerInternalMap()
218 initialCapacity = Math.min(initialCapacity, maximumSize); in MapMakerInternalMap()
227 && (!evictsBySize() || segmentCount * 2 <= maximumSize)) { in MapMakerInternalMap()
248 int maximumSegmentSize = maximumSize / segmentCount + 1; in MapMakerInternalMap()
249 int remainder = maximumSize % segmentCount; in MapMakerInternalMap()
266 return maximumSize != MapMaker.UNSET_INT; in evictsBySize()
3888 valueEquivalence, expireAfterWriteNanos, expireAfterAccessNanos, maximumSize,
3906 final int maximumSize;
3914 long expireAfterWriteNanos, long expireAfterAccessNanos, int maximumSize,
[all …]
/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);
DLocalLoadingCacheTest.java80 .maximumSize(2); in testStats()
183 .maximumSize(2); in testNoStats()
207 .maximumSize(2); in testRecordStats()
294 .maximumSize(SMALL_MAX_SIZE); in testAsMapRecency()
/external/guava/guava/src/com/google/common/cache/
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()
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 …]
/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/
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()
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 …]
DMapMakerInternalMapTest.java86 assertEquals(MapMaker.UNSET_INT, map.maximumSize); in testDefaults()
216 .maximumSize(maxSize)); in checkMaximumSize()
381 .maximumSize(2) in testRemovalListener_size()
731 makeMap(createMapMaker().concurrencyLevel(1).maximumSize(maxSize)); in testSegmentPut_evict()
876 .maximumSize(SMALL_MAX_SIZE) in testReclaimKey()
1030 .maximumSize(SMALL_MAX_SIZE) in testClear()
1061 .maximumSize(SMALL_MAX_SIZE) in testRemoveEntry()
1095 .maximumSize(SMALL_MAX_SIZE) in testReclaimValue()
1142 .maximumSize(SMALL_MAX_SIZE) in testClearValue()
1439 makeMap(createMapMaker().concurrencyLevel(1).maximumSize(maxSize)); in testEvictEntries()
[all …]

12