Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 27 for concurrencyLevel (0.1 sec)

  1. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Interners.java

        }
    
        /**
         * Sets the concurrency level that will be used by the to-be-built {@link Interner}.
         *
         * @see MapMaker#concurrencyLevel(int)
         */
        public InternerBuilder concurrencyLevel(int concurrencyLevel) {
          this.mapMaker.concurrencyLevel(concurrencyLevel);
          return this;
        }
    
        public <E> Interner<E> build() {
          if (!strong) {
            mapMaker.weakKeys();
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 13 14:30:51 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  3. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  5. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 52K bytes
    - Viewed (0)
  6. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  7. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/cache/ChainBenchmark.java

      @SuppressWarnings("GuardedBy")
      @BeforeExperiment
      void setUp() {
        LocalCache<Object, Object> cache =
            new LocalCache<>(CacheBuilder.newBuilder().concurrencyLevel(1), null);
        segment = cache.segments[0];
        chain = null;
        for (int i = 0; i < length; i++) {
          Object key = new Object();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 17 15:19:38 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/cache/SegmentBenchmark.java

      int capacity;
    
      private Segment<Object, Object> segment;
    
      @BeforeExperiment
      void setUp() {
        LocalCache<Object, Object> cache =
            new LocalCache<>(
                CacheBuilder.newBuilder().concurrencyLevel(1).initialCapacity(capacity), null);
        checkState(cache.segments.length == 1);
        segment = cache.segments[0];
        checkState(segment.table.length() == capacity);
        for (int i = 0; i < segment.threshold; i++) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 23 16:59:39 UTC 2019
    - 2.1K bytes
    - Viewed (0)
  10. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 90.8K bytes
    - Viewed (0)
Back to top