- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for removalListener (0.09 sec)
-
guava-tests/test/com/google/common/cache/CacheEvictionTest.java
} public void testEviction_maxSize() { CountingRemovalListener<Integer, Integer> removalListener = countingRemovalListener(); IdentityLoader<Integer> loader = identityLoader(); LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() .maximumSize(MAX_SIZE) .removalListener(removalListener) .build(loader); for (int i = 0; i < 2 * MAX_SIZE; i++) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 15K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalCacheTest.java
RemovalListener<Object, Object> removalListener = new RemovalListener<Object, Object>() { @Override public void onRemoval(RemovalNotification<Object, Object> notification) { notifications.add(notification); } }; Cache<Object, Object> cache = CacheBuilder.newBuilder().removalListener(removalListener).build();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 112.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
refreshExecutor.shutdown(); } } public void testSetRemovalListener() { RemovalListener<Object, Object> testListener = TestingRemovalListeners.nullRemovalListener(); LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder().removalListener(testListener)); assertSame(testListener, map.removalListener); } public void testSetTicker() { Ticker testTicker = new Ticker() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 110.6K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java
boolean accessOrder, long maximumSize, StatsCounter statsCounter, @Nullable RemovalListener<? super K, ? super V> removalListener) { super(initialCapacity, loadFactor, accessOrder); this.maximumSize = maximumSize; this.statsCounter = statsCounter; this.removalListener = removalListener; } @Override protected boolean removeEldestEntry(Entry<K, Timestamped<V>> ignored) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 27 19:19:19 UTC 2024 - 21.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderTest.java
} public void testRemovalListener_setTwice() { RemovalListener<Object, Object> testListener = nullRemovalListener(); CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().removalListener(testListener); assertThrows(IllegalStateException.class, () -> builder.removalListener(testListener)); } public void testValuesIsNotASet() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 15:00:32 UTC 2024 - 24.9K bytes - Viewed (0) -
android/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) -
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) -
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)