- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for IdentityLoader (0.15 sec)
-
guava-tests/test/com/google/common/cache/CacheEvictionTest.java
IdentityLoader<Object> loader = identityLoader(); for (int i = 1; i < 1000; i++) { LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().maximumSize(i).build(loader); assertEquals(i, CacheTesting.getTotalSegmentSize(cache)); } } public void testEviction_setMaxSegmentWeight() { IdentityLoader<Object> loader = identityLoader(); for (int i = 1; i < 1000; i++) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 15K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java
public V load(K key) throws Exception { throw e; } }; } /** Returns a {@link CacheLoader} that returns the key for every request. */ static <T> IdentityLoader<T> identityLoader() { return new IdentityLoader<T>(); } /** * Returns a {@code new Object()} for every request, and increments a counter for every request. * The count is accessible via {@link #getCount}. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 4.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderTest.java
assertThrows(IllegalStateException.class, () -> builder.build(identityLoader())); } @GwtIncompatible // weigher public void testWeigher_withoutMaximumWeight() { CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().weigher(constantWeigher(42)); assertThrows(IllegalStateException.class, () -> builder.build(identityLoader())); } @GwtIncompatible // weigher
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/LocalLoadingCacheTest.java
CacheLoader<Object, Object> loader = identityLoader(); tester.testAllPublicInstanceMethods(makeCache(createCacheBuilder(), loader)); } // stats tests public void testStats() { CacheBuilder<Object, Object> builder = createCacheBuilder().concurrencyLevel(1).maximumSize(2); LocalLoadingCache<Object, Object> cache = makeCache(builder, identityLoader()); assertEquals(EMPTY_STATS, cache.stats());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 12.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java
CacheLoader<Object, Object> loader = identityLoader(); tester.testAllPublicInstanceMethods(makeCache(createCacheBuilder(), loader)); } // stats tests public void testStats() { CacheBuilder<Object, Object> builder = createCacheBuilder().concurrencyLevel(1).maximumSize(2); LocalLoadingCache<Object, Object> cache = makeCache(builder, identityLoader()); assertEquals(EMPTY_STATS, cache.stats());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 12.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/EmptyCachesTest.java
// all caches should be different: instance equality new EqualsTester() .addEqualityGroup(builder.build(identityLoader())) .addEqualityGroup(builder.build(identityLoader())) .addEqualityGroup(builder.build(identityLoader())) .testEquals(); } } public void testGet_null() throws ExecutionException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 11.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/EmptyCachesTest.java
// all caches should be different: instance equality new EqualsTester() .addEqualityGroup(builder.build(identityLoader())) .addEqualityGroup(builder.build(identityLoader())) .addEqualityGroup(builder.build(identityLoader())) .testEquals(); } } public void testGet_null() throws ExecutionException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 11.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java
package com.google.common.cache; import static com.google.common.cache.CacheTesting.checkEmpty; import static com.google.common.cache.CacheTesting.checkValidState; import static com.google.common.cache.TestingCacheLoaders.identityLoader; import static com.google.common.truth.Truth.assertThat; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.SECONDS; import static org.junit.Assert.assertThrows;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 02 18:21:29 UTC 2024 - 15K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/PopulatedCachesTest.java
package com.google.common.cache; import static com.google.common.cache.CacheTesting.checkEmpty; import static com.google.common.cache.CacheTesting.checkValidState; import static com.google.common.cache.TestingCacheLoaders.identityLoader; import static com.google.common.truth.Truth.assertThat; import static java.util.concurrent.TimeUnit.DAYS; import static java.util.concurrent.TimeUnit.SECONDS; import static org.junit.Assert.assertThrows;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 02 18:21:29 UTC 2024 - 15K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java
assertEquals(0, stats.loadExceptionCount()); assertEquals(4, stats.hitCount()); } public void testBulkLoad_loadAll() throws ExecutionException { IdentityLoader<Integer> backingLoader = identityLoader(); CacheLoader<Integer, Integer> loader = bulkLoader(backingLoader); LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder().recordStats().build(loader);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 86.3K bytes - Viewed (0)