- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for RemovalNotification (0.11 sec)
-
android/guava-tests/test/com/google/common/cache/NullCacheTest.java
.maximumSize(0) .removalListener(listener) .build(constantLoader(computed)); Object key = new Object(); assertSame(computed, cache.getUnchecked(key)); RemovalNotification<Object, Object> notification = listener.remove(); assertSame(key, notification.getKey()); assertSame(computed, notification.getValue()); assertSame(RemovalCause.SIZE, notification.getCause());
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
.maximumSize(0) .removalListener(listener) .build(constantLoader(computed)); Object key = new Object(); assertSame(computed, cache.getUnchecked(key)); RemovalNotification<Object, Object> notification = listener.remove(); assertSame(key, notification.getKey()); assertSame(computed, notification.getValue()); assertSame(RemovalCause.SIZE, notification.getCause());
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/CacheBuilderTest.java
// contain the computed value (b -> b), since the clear() happened before the computation // completed. assertEquals(1, listener.size()); RemovalNotification<String, String> notification = listener.remove(); assertEquals("a", notification.getKey()); assertEquals("a", notification.getValue()); assertEquals(1, cache.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) -
guava-tests/test/com/google/common/cache/LocalCacheTest.java
} public void testComputeIfAbsent_removalListener() { List<RemovalNotification<Object, Object>> notifications = new ArrayList<>(); RemovalListener<Object, Object> removalListener = new RemovalListener<Object, Object>() { @Override public void onRemoval(RemovalNotification<Object, Object> notification) { notifications.add(notification); } };
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 112.3K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 27 19:19:19 UTC 2024 - 21.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
final 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 110.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java
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
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); } } /**
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/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) { return 1; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 52K bytes - Viewed (0) -
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) { return 1; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 51.6K bytes - Viewed (0)