Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for CountingRemovalListener (0.44 sec)

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

        return new QueuingRemovalListener<>();
      }
    
      /** Type-inferring factory method for creating a {@link CountingRemovalListener}. */
      static <K, V> CountingRemovalListener<K, V> countingRemovalListener() {
        return new CountingRemovalListener<>();
      }
    
      /** {@link RemovalListener} that adds all {@link RemovalNotification} objects to a queue. */
      @GwtIncompatible // ConcurrentLinkedQueue
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/TestingRemovalListeners.java

        return new QueuingRemovalListener<>();
      }
    
      /** Type-inferring factory method for creating a {@link CountingRemovalListener}. */
      static <K, V> CountingRemovalListener<K, V> countingRemovalListener() {
        return new CountingRemovalListener<>();
      }
    
      /** {@link RemovalListener} that adds all {@link RemovalNotification} objects to a queue. */
      @GwtIncompatible // ConcurrentLinkedQueue
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/CacheEvictionTest.java

        }
    
        assertEquals(MAX_SIZE, cache.size());
        CacheTesting.checkValidState(cache);
      }
    
      public void testEviction_maxSize() {
        CountingRemovalListener<Integer, Integer> removalListener = countingRemovalListener();
        IdentityLoader<Integer> loader = identityLoader();
        LoadingCache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .maximumSize(MAX_SIZE)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 15K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/CacheReferencesTest.java

    import static java.lang.Math.max;
    
    import com.google.common.base.Function;
    import com.google.common.cache.LocalCache.Strength;
    import com.google.common.cache.TestingRemovalListeners.CountingRemovalListener;
    import com.google.common.collect.ImmutableSet;
    import com.google.common.collect.Iterables;
    import java.lang.ref.WeakReference;
    import junit.framework.TestCase;
    
    /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        assertFalse(CacheBuilder.newBuilder().build().asMap().values() instanceof Set);
      }
    
      @GwtIncompatible // CacheTesting
      public void testNullCache() {
        CountingRemovalListener<Object, Object> listener = countingRemovalListener();
        LoadingCache<Object, Object> nullCache =
            CacheBuilder.newBuilder().maximumSize(0).removalListener(listener).build(identityLoader());
        assertEquals(0, nullCache.size());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

          assertTrue(count <= (segment.table.length() * 3 / 4));
          assertTrue(count > (segment.table.length() * 3 / 8));
        }
      }
    
      public void testReclaimKey() {
        CountingRemovalListener<Object, Object> listener = countingRemovalListener();
        LocalCache<Object, Object> map =
            makeLocalCache(
                createCacheBuilder()
                    .concurrencyLevel(1)
                    .initialCapacity(1)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/LocalCacheTest.java

          assertTrue(count <= (segment.table.length() * 3 / 4));
          assertTrue(count > (segment.table.length() * 3 / 8));
        }
      }
    
      public void testReclaimKey() {
        CountingRemovalListener<Object, Object> listener = countingRemovalListener();
        LocalCache<Object, Object> map =
            makeLocalCache(
                createCacheBuilder()
                    .concurrencyLevel(1)
                    .initialCapacity(1)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 112.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

                if (count.getAndIncrement() == 0) {
                  throw e;
                }
                return key.toString();
              }
            };
        CountingRemovalListener<Integer, String> removalListener = countingRemovalListener();
        LoadingCache<Integer, String> cache =
            CacheBuilder.newBuilder().removalListener(removalListener).build(failOnceFunction);
    
        UncheckedExecutionException ue =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 86.3K bytes
    - Viewed (0)
Back to top