- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 15 for maximumWeight (0.25 seconds)
-
guava-tests/test/com/google/common/cache/CacheEvictionTest.java
public void testEviction_setMaxSegmentWeight() { IdentityLoader<Object> loader = identityLoader(); for (int i = 1; i < 1000; i++) { LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().maximumWeight(i).weigher(constantWeigher(1)).build(loader); assertThat(CacheTesting.getTotalSegmentSize(cache)).isEqualTo(i); } } public void testEviction_maxSizeOneSegment() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 15K bytes - Click Count (0) -
android/guava/src/com/google/common/cache/CacheBuilderSpec.java
checkArgument( spec.maximumWeight == null, "maximum weight was already set to %s", spec.maximumWeight); spec.maximumSize = value; } } /** Parse maximumWeight */ private static final class MaximumWeightParser extends LongParser { @Override void parseLong(CacheBuilderSpec spec, long value) { checkArgument(
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 18.2K bytes - Click Count (0) -
guava/src/com/google/common/cache/CacheBuilderSpec.java
checkArgument( spec.maximumWeight == null, "maximum weight was already set to %s", spec.maximumWeight); spec.maximumSize = value; } } /** Parse maximumWeight */ private static final class MaximumWeightParser extends LongParser { @Override void parseLong(CacheBuilderSpec spec, long value) { checkArgument(
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 18.2K bytes - Click Count (0) -
android/guava/src/com/google/common/cache/CacheBuilder.java
if (weigher == null) { checkState(maximumWeight == UNSET_INT, "maximumWeight requires weigher"); } else { if (strictParsing) { checkState(maximumWeight != UNSET_INT, "weigher requires maximumWeight"); } else { if (maximumWeight == UNSET_INT) { LoggerHolder.logger.log( Level.WARNING, "ignoring weigher specified without maximumWeight"); } } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 13:13:59 GMT 2026 - 52K bytes - Click Count (0) -
guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java
CacheBuilder.newBuilder().maximumWeight(9000), CacheBuilder.from(spec)); } public void testParse_maximumWeightRepeated() { assertThrows(IllegalArgumentException.class, () -> parse("maximumWeight=10, maximumWeight=20")); } public void testParse_maximumSizeAndMaximumWeight() { assertThrows(IllegalArgumentException.class, () -> parse("maximumSize=10, maximumWeight=20")); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 30 22:03:28 GMT 2025 - 20.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/CacheEvictionTest.java
public void testEviction_setMaxSegmentWeight() { IdentityLoader<Object> loader = identityLoader(); for (int i = 1; i < 1000; i++) { LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().maximumWeight(i).weigher(constantWeigher(1)).build(loader); assertThat(CacheTesting.getTotalSegmentSize(cache)).isEqualTo(i); } } public void testEviction_maxSizeOneSegment() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 15K bytes - Click Count (0) -
guava/src/com/google/common/cache/CacheBuilder.java
if (weigher == null) { checkState(maximumWeight == UNSET_INT, "maximumWeight requires weigher"); } else { if (strictParsing) { checkState(maximumWeight != UNSET_INT, "weigher requires maximumWeight"); } else { if (maximumWeight == UNSET_INT) { LoggerHolder.logger.log( Level.WARNING, "ignoring weigher specified without maximumWeight"); } } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 13:13:59 GMT 2026 - 51.7K bytes - Click Count (0) -
guava/src/com/google/common/cache/RemovalCause.java
boolean wasEvicted() { return true; } }, /** * The entry was evicted due to size constraints. This can occur when using {@link * CacheBuilder#maximumSize} or {@link CacheBuilder#maximumWeight}. */ SIZE { @Override boolean wasEvicted() { return true; } }; /** * Returns {@code true} if there was an automatic removal due to eviction (the cause is neither
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Dec 21 03:10:51 GMT 2024 - 2.7K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java
assertThrows(IllegalStateException.class, () -> builder.maximumWeight(16)); assertThrows(IllegalStateException.class, () -> builder.maximumSize(16)); } @J2ktIncompatible @GwtIncompatible // maximumWeight public void testMaximumWeight_withoutWeigher() { CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().maximumWeight(1);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 25.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/cache/CacheBuilderTest.java
assertThrows(IllegalStateException.class, () -> builder.maximumWeight(16)); assertThrows(IllegalStateException.class, () -> builder.maximumSize(16)); } @J2ktIncompatible @GwtIncompatible // maximumWeight public void testMaximumWeight_withoutWeigher() { CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().maximumWeight(1);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 25.6K bytes - Click Count (0)