- Sort Score
- Result 10 results
- Languages All
Results 11 - 19 of 19 for RemovalListener (0.09 sec)
-
guava-tests/test/com/google/common/cache/NullCacheTest.java
} public void testGet() { Object computed = new Object(); LoadingCache<Object, Object> cache = CacheBuilder.newBuilder() .maximumSize(0) .removalListener(listener) .build(constantLoader(computed)); Object key = new Object(); assertSame(computed, cache.getUnchecked(key)); RemovalNotification<Object, Object> notification = listener.remove();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 4.4K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/CacheBuilder.java
*/ public <K1 extends K, V1 extends V> CacheBuilder<K1, V1> removalListener( RemovalListener<? super K1, ? super V1> listener) { checkState(this.removalListener == null); // safely limiting the kinds of caches this can produce @SuppressWarnings("unchecked") CacheBuilder<K1, V1> me = (CacheBuilder<K1, V1>) this; me.removalListener = checkNotNull(listener); return me; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 52K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheReferencesTest.java
} // fails in Maven with 64-bit JDK: https://github.com/google/guava/issues/1568 private void assertCleanup( LoadingCache<Integer, String> cache, CountingRemovalListener<Integer, String> removalListener) { // initialSize will most likely be 2, but it's possible for the GC to have already run, so we'll // observe a size of 1 long initialSize = cache.size();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 6.2K bytes - Viewed (0) -
guava/src/com/google/common/cache/CacheBuilder.java
*/ public <K1 extends K, V1 extends V> CacheBuilder<K1, V1> removalListener( RemovalListener<? super K1, ? super V1> listener) { checkState(this.removalListener == null); // safely limiting the kinds of caches this can produce @SuppressWarnings("unchecked") CacheBuilder<K1, V1> me = (CacheBuilder<K1, V1>) this; me.removalListener = checkNotNull(listener); return me; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 51.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java
assertEquals("keyEquivalence", a.keyEquivalence, b.keyEquivalence); assertEquals("keyStrength", a.keyStrength, b.keyStrength); assertEquals("removalListener", a.removalListener, b.removalListener); assertEquals("weigher", a.weigher, b.weigher); assertEquals("valueEquivalence", a.valueEquivalence, b.valueEquivalence); assertEquals("valueStrength", a.valueStrength, b.valueStrength);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 19.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java
assertEquals("keyEquivalence", a.keyEquivalence, b.keyEquivalence); assertEquals("keyStrength", a.keyStrength, b.keyStrength); assertEquals("removalListener", a.removalListener, b.removalListener); assertEquals("weigher", a.weigher, b.weigher); assertEquals("valueEquivalence", a.valueEquivalence, b.valueEquivalence); assertEquals("valueStrength", a.valueStrength, b.valueStrength);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 19.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java
assertEquals(Integer.valueOf(50), asMap.get(10)); } public void testRemovalListener() { final int[] stats = new int[4]; RemovalListener<Integer, Integer> countingListener = new RemovalListener<Integer, Integer>() { @Override public void onRemoval(RemovalNotification<Integer, Integer> notification) { switch (notification.getCause()) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 14.4K bytes - Viewed (0) -
guava/src/com/google/common/cache/LocalCache.java
/** * A listener that is invoked when an entry is removed due to expiration or garbage collection of * soft/weak entries. */ final RemovalListener<K, V> removalListener; /** Measures time in a testable way. */ final Ticker ticker; /** Factory used to create new entries. */ final EntryFactory entryFactory; /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 149.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java
} 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)