- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 14 for RemovalNotification (0.1 seconds)
-
android/guava-tests/test/com/google/common/cache/NullCacheTest.java
.removalListener(listener) .build(constantLoader(computed)); Object key = new Object(); assertThat(cache.getUnchecked(key)).isSameInstanceAs(computed); RemovalNotification<Object, Object> notification = listener.remove(); assertThat(notification.getKey()).isSameInstanceAs(key); assertThat(notification.getValue()).isSameInstanceAs(computed);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Dec 11 20:07:52 GMT 2025 - 4.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/cache/LocalCacheMapComputeTest.java
} public void testComputeIfPresentRemove() { List<RemovalNotification<Integer, Integer>> notifications = new ArrayList<>(); Cache<Integer, Integer> cache = CacheBuilder.newBuilder() .removalListener((RemovalNotification<Integer, Integer> n) -> notifications.add(n)) .build(); cache.put(1, 2);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 6.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/TestingRemovalListeners.java
} /** {@link RemovalListener} that adds all {@link RemovalNotification} objects to a queue. */ @J2ktIncompatible @GwtIncompatible // ConcurrentLinkedQueue static class QueuingRemovalListener<K, V> extends ConcurrentLinkedQueue<RemovalNotification<K, V>> implements RemovalListener<K, V> { @Override public void onRemoval(RemovalNotification<K, V> notification) { add(notification); } }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 13:13:59 GMT 2026 - 3.2K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/script/groovy/GroovyEngine.java
import org.lastaflute.di.core.factory.SingletonLaContainerFactory; import org.lastaflute.job.LaJobRuntime; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.cache.RemovalNotification; import groovy.lang.Binding; import groovy.lang.GroovyClassLoader; import groovy.lang.Script; import jakarta.annotation.PostConstruct; import jakarta.annotation.PreDestroy; /**
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Mar 26 14:36:23 GMT 2026 - 11.9K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java
// contain the computed value (b -> b), since the clear() happened before the computation // completed. assertThat(listener).hasSize(1); RemovalNotification<String, String> notification = listener.remove(); assertThat(notification.getKey()).isEqualTo("a"); assertThat(notification.getValue()).isEqualTo("a"); assertThat(cache.size()).isEqualTo(1);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 25.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/cache/CacheBuilderTest.java
// contain the computed value (b -> b), since the clear() happened before the computation // completed. assertThat(listener).hasSize(1); RemovalNotification<String, String> notification = listener.remove(); assertThat(notification.getKey()).isEqualTo("a"); assertThat(notification.getValue()).isEqualTo("a"); assertThat(cache.size()).isEqualTo(1);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 25.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/cache/LocalCacheTest.java
assertThat(map.values().removeAll(ImmutableSet.of("bar"))).isTrue(); assertThat(map).hasSize(1); } public void testComputeIfAbsent_removalListener() { List<RemovalNotification<Object, Object>> notifications = new ArrayList<>(); RemovalListener<Object, Object> removalListener = notifications::add; Cache<Object, Object> cache =
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 116.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
assertThat(listener.isEmpty()).isTrue(); } static <K, V> void assertNotified( QueuingRemovalListener<K, V> listener, K key, V value, RemovalCause cause) { RemovalNotification<K, V> notification = listener.remove(); assertThat(notification.getKey()).isSameInstanceAs(key); assertThat(notification.getValue()).isSameInstanceAs(value);Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 114.9K bytes - Click Count (0) -
android/guava/src/com/google/common/cache/LocalCache.java
totalWeight -= weight; if (cause.wasEvicted()) { statsCounter.recordEviction(); } if (map.removalNotificationQueue != DISCARDING_QUEUE) { RemovalNotification<K, V> notification = RemovalNotification.create(key, value, cause); map.removalNotificationQueue.offer(notification); } } /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 143.5K bytes - Click Count (0) -
guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/CapacityEnforcingMap.java
boolean removal = (maximumSize == LocalCache.UNSET_INT) ? false : (size() > maximumSize); if ((removalListener != null) && removal) { removalListener.onRemoval( RemovalNotification.create( ignored.getKey(), ignored.getValue().getValue(), RemovalCause.SIZE)); } statsCounter.recordEviction(); return removal; }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 13:13:59 GMT 2026 - 2.1K bytes - Click Count (0)