- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for getOrLoad (0.04 seconds)
-
guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java
K castKey = (K) key; alertListenerIfPresent(castKey, value.getValue(), RemovalCause.EXPIRED); cachingHashMap.remove(key); return null; } } private V getOrLoad(K key) throws ExecutionException { V value = get(key); if (value != null) { return value; } return load(key); } @SuppressWarnings("GoodTime") // timestamps as numeric primitivesCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Aug 11 19:31:30 GMT 2025 - 21.8K bytes - Click Count (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 reloadCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Fri Dec 12 00:25:21 GMT 2025 - 117.5K bytes - Click Count (0) -
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 reloadCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Fri Dec 12 00:25:21 GMT 2025 - 115.9K bytes - Click Count (0) -
guava/src/com/google/common/cache/LocalCache.java
} @Override public @Nullable V getOrDefault(@Nullable Object key, @Nullable 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;
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Sep 11 19:35:11 GMT 2025 - 148.9K bytes - Click Count (0)