- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for onRemoval (0.29 sec)
-
guava-tests/test/com/google/common/cache/TestingRemovalListeners.java
@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); } } /** * {@link RemovalListener} that counts each {@link RemovalNotification} it receives, and provides
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 3.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalCacheMapComputeTest.java
Cache<Integer, Integer> cache = CacheBuilder.newBuilder() .removalListener( new RemovalListener<Integer, Integer>() { @Override public void onRemoval(RemovalNotification<Integer, Integer> notification) { notifications.add(notification); } }) .build(); cache.put(1, 2);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Feb 12 03:49:18 UTC 2025 - 6.4K bytes - Viewed (0) -
guava/src/com/google/common/cache/RemovalListeners.java
RemovalListener<K, V> listener, Executor executor) { checkNotNull(listener); checkNotNull(executor); return (RemovalNotification<K, V> notification) -> executor.execute(() -> listener.onRemoval(notification)); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 1.5K bytes - Viewed (0) -
guava/src/com/google/common/cache/RemovalListener.java
* already been re-added. */ // Technically should accept RemovalNotification<? extends K, ? extends V>, but because // RemovalNotification is guaranteed covariant, let's make users' lives simpler. void onRemoval(RemovalNotification<K, V> notification);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 2K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/RemovalListener.java
* already been re-added. */ // Technically should accept RemovalNotification<? extends K, ? extends V>, but because // RemovalNotification is guaranteed covariant, let's make users' lives simpler. void onRemoval(RemovalNotification<K, V> notification);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 2K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java
private long currentTimeNanos() { return ticker.read(); } private void alertListenerIfPresent(K key, V value, RemovalCause cause) { if (removalListener != null) { removalListener.onRemoval(RemovalNotification.create(key, value, cause)); } } @SuppressWarnings("GoodTime") // timestamps as numeric primitives private V load(K key) throws ExecutionException { long startTime = ticker.read();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 21.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java
int[] stats = new int[4]; RemovalListener<Integer, Integer> countingListener = new RemovalListener<Integer, Integer>() { @Override public void onRemoval(RemovalNotification<Integer, Integer> notification) { switch (notification.getCause()) { case EXPIRED: stats[0]++; break; case EXPLICIT:
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 14.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java
AtomicInteger totalSum = new AtomicInteger(); RemovalListener<Integer, AtomicInteger> removalListener = new RemovalListener<Integer, AtomicInteger>() { @Override public void onRemoval(RemovalNotification<Integer, AtomicInteger> notification) { if (notification.wasEvicted()) { evictionCount.incrementAndGet(); totalSum.addAndGet(notification.getValue().get());
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 18.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
RuntimeException e = new RuntimeException(); RemovalListener<Object, Object> listener = new RemovalListener<Object, Object>() { @Override public void onRemoval(RemovalNotification<Object, Object> notification) { throw e; } }; CacheBuilder<Object, Object> builder = createCacheBuilder().removalListener(listener);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 110.5K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/CacheBuilder.java
return new SimpleStatsCounter(); } }; enum NullListener implements RemovalListener<Object, Object> { INSTANCE; @Override public void onRemoval(RemovalNotification<Object, Object> notification) {} } enum OneWeigher implements Weigher<Object, Object> { INSTANCE; @Override public int weigh(Object key, Object value) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 51.7K bytes - Viewed (0)