Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testComputeIfAbsent (0.93 sec)

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

        super.setUp();
        this.cache =
            CacheBuilder.newBuilder()
                .expireAfterAccess(500000, MILLISECONDS)
                .maximumSize(count)
                .build();
      }
    
      public void testComputeIfAbsent() {
        // simultaneous insertion for same key, expect 1 winner
        doParallelCacheOp(
            count,
            n -> {
              cache.asMap().computeIfAbsent(key, k -> "value" + n);
            });
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 6.4K bytes
    - Viewed (0)
Back to top