Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for getOrLoad (0.07 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 21.6K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
  3. 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)
  4. 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)
Back to top