Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 29 for maximumSize (0.04 sec)

  1. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

        /* Implements size-capped LinkedHashMap */
        final long maximumSize = builder.maximumSize;
        this.cachingHashMap =
            new CapacityEnforcingLinkedHashMap<K, V>(
                builder.getInitialCapacity(),
                0.75f,
                (builder.maximumSize != UNSET_INT),
                builder.maximumSize,
                statsCounter,
                removalListener);
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 21.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/NullCacheTest.java

        listener = queuingRemovalListener();
      }
    
      public void testGet() {
        Object computed = new Object();
        LoadingCache<Object, Object> cache =
            CacheBuilder.newBuilder()
                .maximumSize(0)
                .removalListener(listener)
                .build(constantLoader(computed));
    
        Object key = new Object();
        assertThat(cache.getUnchecked(key)).isSameInstanceAs(computed);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:07:52 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/NullCacheTest.java

        listener = queuingRemovalListener();
      }
    
      public void testGet() {
        Object computed = new Object();
        LoadingCache<Object, Object> cache =
            CacheBuilder.newBuilder()
                .maximumSize(0)
                .removalListener(listener)
                .build(constantLoader(computed));
    
        Object key = new Object();
        assertThat(cache.getUnchecked(key)).isSameInstanceAs(computed);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:07:52 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

        tester.testAllPublicInstanceMethods(makeCache(createCacheBuilder(), loader));
      }
    
      // stats tests
    
      public void testStats() {
        CacheBuilder<Object, Object> builder = createCacheBuilder().concurrencyLevel(1).maximumSize(2);
        LocalLoadingCache<Object, Object> cache = makeCache(builder, identityLoader());
        assertThat(cache.stats()).isEqualTo(EMPTY_STATS);
    
        Object one = new Object();
        cache.getUnchecked(one);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 13.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/LocalCacheTest.java

          result.add(builder.maximumSize(SMALL_MAX_SIZE).expireAfterAccess(99999, SECONDS));
        }
        for (CacheBuilder<Object, Object> builder : allKeyValueStrengthMakers()) {
          result.add(builder.maximumSize(SMALL_MAX_SIZE).expireAfterWrite(99999, SECONDS));
        }
        return result;
      }
    
      /** Returns an iterable containing all combinations of maximumSize and expireAfterAccess/Write. */
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Dec 12 00:25:21 UTC 2025
    - 117.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

          result.add(builder.maximumSize(SMALL_MAX_SIZE).expireAfterAccess(99999, SECONDS));
        }
        for (CacheBuilder<Object, Object> builder : allKeyValueStrengthMakers()) {
          result.add(builder.maximumSize(SMALL_MAX_SIZE).expireAfterWrite(99999, SECONDS));
        }
        return result;
      }
    
      /** Returns an iterable containing all combinations of maximumSize and expireAfterAccess/Write. */
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Dec 12 00:25:21 UTC 2025
    - 115.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

            rawtypeToWildcard(MinMaxPriorityQueue.maximumSize(42)).create();
        assertEquals(11, queue.capacity());
        assertEquals(42, queue.maximumSize);
        checkNatural(queue);
      }
    
      public void testCreation_comparator_maximumSize() {
        MinMaxPriorityQueue<Integer> queue =
            MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).maximumSize(42).create();
        assertEquals(11, queue.capacity());
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 36.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

        // WARMUP_MAX), but the tests assume no values get evicted. Even with a maximumSize of 100, one
        // of the values gets evicted. With weak keys, we use identity equality, which means using
        // System.identityHashCode, which means the assignment of keys to segments is nondeterministic,
        // so more than (maximumSize / #segments) keys could get assigned to the same segment, which
        // would cause one to be evicted.
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 15.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        cache.put(0, 10);
        cache.invalidateAll();
        assertThat(cache.get(0, loader)).isEqualTo(4);
      }
    
      @Test
      public void sizeConstraint() {
        Cache<Integer, Integer> cache = CacheBuilder.newBuilder().maximumSize(4).build();
    
        cache.put(1, 10);
        cache.put(2, 20);
        cache.put(3, 30);
        cache.put(4, 40);
        cache.put(5, 50);
    
        assertThat(cache.getIfPresent(10)).isNull();
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 14.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

        // WARMUP_MAX), but the tests assume no values get evicted. Even with a maximumSize of 100, one
        // of the values gets evicted. With weak keys, we use identity equality, which means using
        // System.identityHashCode, which means the assignment of keys to segments is nondeterministic,
        // so more than (maximumSize / #segments) keys could get assigned to the same segment, which
        // would cause one to be evicted.
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 15.7K bytes
    - Viewed (0)
Back to top