Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for getIfPresent (0.21 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, TimeUnit.MILLISECONDS);
        assertEquals(null, cache.getIfPresent(10));
        assertEquals(null, cache.getIfPresent(20));
        assertEquals(null, cache.getIfPresent(4));
    
        cache.put(10, 20);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 15.1K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/helper/CrawlerStatsHelper.java

        }
    
        public void record(final Object keyObj, final String action) {
            getCacheKey(keyObj).ifPresent(key -> {
                try {
                    final StatsObject data = statsCache.getIfPresent(key);
                    if (data != null) {
                        data.put(escapeValue(action), getCurrentTimeMillis());
                    }
                } catch (final Exception e) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 9.9K 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
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Sun Aug 07 02:38:22 GMT 2022
    - 12.6K bytes
    - Viewed (0)
  4. 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
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sun Aug 07 02:38:22 GMT 2022
    - 12.6K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

            return newValue;
          } catch (Exception e) {
            throw new ExecutionException(e);
          }
        }
    
        @Override
        public @Nullable V getIfPresent(Object key) {
          return localCache.getIfPresent(key);
        }
    
        @Override
        public void put(K key, V value) {
          localCache.put(key, value);
        }
    
        @Override
        public void invalidate(Object key) {
    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)
  6. guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java

      }
    
      // Since we can't pass a concrete SomeEnum.class directly, we need to use a raw type.
      @SuppressWarnings("unchecked")
      @Benchmark
      boolean getIfPresent(int repetitions) {
        boolean retVal = false;
        for (int i = 0; i < repetitions; ++i) {
          retVal &= Enums.getIfPresent(enumType, sampleData[i & 255]).isPresent();
        }
        return retVal;
      }
    
      private enum SmallEnum {
        X0,
        X1,
        X2
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java

      }
    
      // Since we can't pass a concrete SomeEnum.class directly, we need to use a raw type.
      @SuppressWarnings("unchecked")
      @Benchmark
      boolean getIfPresent(int repetitions) {
        boolean retVal = false;
        for (int i = 0; i < repetitions; ++i) {
          retVal &= Enums.getIfPresent(enumType, sampleData[i & 255]).isPresent();
        }
        return retVal;
      }
    
      private enum SmallEnum {
        X0,
        X1,
        X2
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

          cache.invalidate(1);
          assertEquals(0, cache.size());
    
          entry.setValue(3);
          assertEquals(1, cache.size());
          assertEquals(3, cache.getIfPresent(1));
          checkValidState(cache);
    
          assertThrows(NullPointerException.class, () -> entry.setValue(null));
          checkValidState(cache);
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 15K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

          cache.invalidate(1);
          assertEquals(0, cache.size());
    
          entry.setValue(3);
          assertEquals(1, cache.size());
          assertEquals(3, cache.getIfPresent(1));
          checkValidState(cache);
    
          assertThrows(NullPointerException.class, () -> entry.setValue(null));
          checkValidState(cache);
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 15K bytes
    - Viewed (0)
Back to top