Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for getOrLoad (0.16 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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  2. 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
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 112.3K bytes
    - Viewed (0)
  3. 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
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 110.7K bytes
    - Viewed (0)
  4. android/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;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 144.7K bytes
    - Viewed (0)
  5. 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;
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
Back to top