Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getOrLoad (0.86 sec)

  1. 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 primitives
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 21.8K bytes
    - Viewed (0)
  2. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 110.5K bytes
    - Viewed (0)
Back to top