- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for CountingLoader (0.1 sec)
-
android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java
System.gc(); } assertEquals(expectedComputations, countingLoader.getCount()); } public void testReloadAfterSimulatedValueReclamation() throws ExecutionException { CountingLoader countingLoader = new CountingLoader(); LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().concurrencyLevel(1).weakValues().build(countingLoader); Object key = new Object();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 86.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
assertSame(EntryFactory.WEAK_ACCESS_WRITE, EntryFactory.getFactory(Strength.WEAK, true, true)); } // computation tests public void testCompute() throws ExecutionException { CountingLoader loader = new CountingLoader(); LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder()); assertEquals(0, loader.getCount()); Object key = new Object(); Object value = map.get(key, loader);
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/LocalCacheTest.java
assertSame(EntryFactory.WEAK_ACCESS_WRITE, EntryFactory.getFactory(Strength.WEAK, true, true)); } // computation tests public void testCompute() throws ExecutionException { CountingLoader loader = new CountingLoader(); LocalCache<Object, Object> map = makeLocalCache(createCacheBuilder()); assertEquals(0, loader.getCount()); Object key = new Object(); Object value = map.get(key, loader);
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/TestingCacheLoaders.java
} /** * Returns a {@code new Object()} for every request, and increments a counter for every request. * The count is accessible via {@link #getCount}. */ static class CountingLoader extends CacheLoader<Object, Object> { private final AtomicInteger count = new AtomicInteger(); @Override public Object load(Object from) { count.incrementAndGet(); return new Object();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 4.9K bytes - Viewed (0)