Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for maximumWeight (0.11 sec)

  1. 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);
          assertEquals(i, CacheTesting.getTotalSegmentSize(cache));
        }
      }
    
      public void testEviction_maxSizeOneSegment() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. 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"));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  3. android/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"));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  4. 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");
            }
          }
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 52K bytes
    - Viewed (0)
  5. 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");
            }
          }
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        assertThrows(IllegalStateException.class, () -> builder.maximumWeight(16));
        assertThrows(IllegalStateException.class, () -> builder.maximumSize(16));
      }
    
      @GwtIncompatible // maximumWeight
      public void testMaximumWeight_withoutWeigher() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().maximumWeight(1);
        assertThrows(IllegalStateException.class, () -> builder.build(identityLoader()));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

                    new TestStringCacheGenerator(
                        createCacheBuilder()
                            .maximumWeight(Integer.MAX_VALUE)
                            .weigher(new SerializableWeigher<String, String>())))
                .named("LocalCache with maximumWeight")
                .withFeatures(
                    CollectionSize.ANY,
                    MapFeature.GENERAL_PURPOSE,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/LocalCacheTest.java

                    new TestStringCacheGenerator(
                        createCacheBuilder()
                            .maximumWeight(Integer.MAX_VALUE)
                            .weigher(new SerializableWeigher<String, String>())))
                .named("LocalCache with maximumWeight")
                .withFeatures(
                    CollectionSize.ANY,
                    MapFeature.GENERAL_PURPOSE,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 112.3K bytes
    - Viewed (0)
  9. guava/src/com/google/common/cache/LocalCache.java

          }
          if (weigher != OneWeigher.INSTANCE) {
            Object unused = builder.weigher(weigher);
            if (maxWeight != UNSET_INT) {
              builder.maximumWeight(maxWeight);
            }
          } else {
            if (maxWeight != UNSET_INT) {
              builder.maximumSize(maxWeight);
            }
          }
          if (ticker != null) {
            builder.ticker(ticker);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 149.2K bytes
    - Viewed (0)
Back to top