- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for getOrLoad (0.07 sec)
-
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
} }; LocalCache<String, String> cache = makeLocalCache(builder, loader); assertThat(cache.getOrLoad("test")).isEqualTo("testLoad"); ticker.advance(10, MILLISECONDS); // so that the next call will trigger refresh assertThat(cache.getOrLoad("test")).isEqualTo("testLoad"); reloadStarted.await(); ticker.advance(500, MILLISECONDS); // so that the entry expires during the reload
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
} }; LocalCache<String, String> cache = makeLocalCache(builder, loader); assertThat(cache.getOrLoad("test")).isEqualTo("testLoad"); ticker.advance(10, MILLISECONDS); // so that the next call will trigger refresh assertThat(cache.getOrLoad("test")).isEqualTo("testLoad"); reloadStarted.await(); ticker.advance(500, MILLISECONDS); // so that the entry expires during the reload
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/src/com/google/common/cache/LocalCache.java
@Override @CheckForNull public V getOrDefault(@CheckForNull Object key, @CheckForNull V defaultValue) { V result = get(key); return (result != null) ? result : defaultValue; } V getOrLoad(K key) throws ExecutionException { return get(key, defaultLoader); } ImmutableMap<K, V> getAllPresent(Iterable<?> keys) { int hits = 0; int misses = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 149.2K bytes - Viewed (0)