Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for concurrencyLevel (0.12 sec)

  1. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

        checkConcurrencyLevel(7, 8);
        checkConcurrencyLevel(8, 8);
      }
    
      private static void checkConcurrencyLevel(int concurrencyLevel, int segmentCount) {
        LocalCache<Object, Object> map =
            makeLocalCache(createCacheBuilder().concurrencyLevel(concurrencyLevel));
        assertThat(map.segments).hasLength(segmentCount);
      }
    
      public void testSetInitialCapacity() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 110.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/MapMaker.java

       *
       * @throws IllegalArgumentException if {@code concurrencyLevel} is nonpositive
       * @throws IllegalStateException if a concurrency level was already set
       */
      @CanIgnoreReturnValue
      public MapMaker concurrencyLevel(int concurrencyLevel) {
        checkState(
            this.concurrencyLevel == UNSET_INT,
            "concurrency level was already set to %s",
            this.concurrencyLevel);
        checkArgument(concurrencyLevel > 0);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/cache/CacheBuilder.java

       */
      @CanIgnoreReturnValue
      public CacheBuilder<K, V> concurrencyLevel(int concurrencyLevel) {
        checkState(
            this.concurrencyLevel == UNSET_INT,
            "concurrency level was already set to %s",
            this.concurrencyLevel);
        checkArgument(concurrencyLevel > 0);
        this.concurrencyLevel = concurrencyLevel;
        return this;
      }
    
      int getConcurrencyLevel() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 51.7K 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());
        assertEquals(EMPTY_STATS, cache.stats());
    
        Object one = new Object();
        cache.getUnchecked(one);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheEvictionTest.java

        }
      }
    
      public void testEviction_maxSizeOneSegment() {
        IdentityLoader<Integer> loader = identityLoader();
        LoadingCache<Integer, Integer> cache =
            CacheBuilder.newBuilder().concurrencyLevel(1).maximumSize(MAX_SIZE).build(loader);
        for (int i = 0; i < 2 * MAX_SIZE; i++) {
          cache.getUnchecked(i);
          assertEquals(min(i + 1, MAX_SIZE), cache.size());
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 15K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java

          @Nullable Strength keyStrength,
          @Nullable Strength valueStrength) {
    
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder();
        if (concurrencyLevel != null) {
          builder.concurrencyLevel(concurrencyLevel);
        }
        if (initialCapacity != null) {
          builder.initialCapacity(initialCapacity);
        }
        if (maximumSize != null) {
          builder.maximumSize(maximumSize);
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        assertThrows(IllegalArgumentException.class, () -> builder.concurrencyLevel(0));
      }
    
      public void testConcurrencyLevel_setTwice() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().concurrencyLevel(16);
        assertThrows(IllegalStateException.class, () -> builder.concurrencyLevel(16));
      }
    
      @GwtIncompatible // CacheTesting
      public void testConcurrencyLevel_small() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        assertThrows(IllegalArgumentException.class, () -> builder.concurrencyLevel(0));
      }
    
      public void testConcurrencyLevel_setTwice() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().concurrencyLevel(16);
        assertThrows(IllegalStateException.class, () -> builder.concurrencyLevel(16));
      }
    
      @GwtIncompatible // CacheTesting
      public void testConcurrencyLevel_small() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/MapMakerInternalMap.java

        concurrencyLevel = min(builder.getConcurrencyLevel(), MAX_SEGMENTS);
    
        keyEquivalence = builder.getKeyEquivalence();
        this.entryHelper = entryHelper;
    
        int initialCapacity = min(builder.getInitialCapacity(), MAXIMUM_CAPACITY);
    
        // Find power-of-two sizes best matching arguments. Constraints:
        // (segmentCount > concurrencyLevel)
        int segmentShift = 0;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 90K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        FakeTicker ticker = new FakeTicker();
        IdentityLoader<Integer> loader = identityLoader();
        LoadingCache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .concurrencyLevel(1)
                .expireAfterAccess(11, MILLISECONDS)
                .ticker(ticker)
                .build(loader);
        for (int i = 0; i < 10; i++) {
          cache.getUnchecked(i);
          ticker.advance(1, MILLISECONDS);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 18.7K bytes
    - Viewed (0)
Back to top