Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for getIfPresent (0.1 sec)

  1. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        assertEquals(Integer.valueOf(100), cache.getIfPresent(10));
        assertEquals(Integer.valueOf(200), cache.getIfPresent(20));
        assertEquals(Integer.valueOf(2), cache.getIfPresent(4));
    
        fakeTicker.advance(2, MILLISECONDS);
        assertEquals(null, cache.getIfPresent(10));
        assertEquals(null, cache.getIfPresent(20));
        assertEquals(null, cache.getIfPresent(4));
    
        cache.put(10, 20);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/CacheStats.java

       * as a result of a refresh or if the cache loader returned more items than was requested. {@code
       * missCount} may also be incremented not in conjunction with this (nor {@link
       * #loadExceptionCount}) on calls to {@code getIfPresent}.
       */
      public long loadSuccessCount() {
        return loadSuccessCount;
      }
    
      /**
       * Returns the number of times {@link Cache} lookup methods threw an exception while loading a new
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/cache/CacheStats.java

       * as a result of a refresh or if the cache loader returned more items than was requested. {@code
       * missCount} may also be incremented not in conjunction with this (nor {@link
       * #loadExceptionCount}) on calls to {@code getIfPresent}.
       */
      public long loadSuccessCount() {
        return loadSuccessCount;
      }
    
      /**
       * Returns the number of times {@link Cache} lookup methods threw an exception while loading a new
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

        ticker.advance(1, MILLISECONDS);
        assertSame(one, cache.getIfPresent(key));
        stats = cache.stats();
        assertEquals(1, stats.missCount());
        assertEquals(1, stats.loadSuccessCount());
        assertEquals(0, stats.loadExceptionCount());
        assertEquals(1, stats.hitCount());
    
        ticker.advance(1, MILLISECONDS);
        assertSame(two, cache.getIfPresent(key));
        stats = cache.stats();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 86.3K bytes
    - Viewed (0)
  5. guava/src/com/google/common/cache/LocalCache.java

          this.localCache = localCache;
        }
    
        // Cache methods
    
        @Override
        @CheckForNull
        public V getIfPresent(Object key) {
          return localCache.getIfPresent(key);
        }
    
        @Override
        public V get(K key, final Callable<? extends V> valueLoader) throws ExecutionException {
          checkNotNull(valueLoader);
    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