Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for LoadingCache (0.53 sec)

  1. android/guava/src/com/google/common/cache/LoadingCache.java

     * @param <V> the type of the cache's values, which are not permitted to be null
     * @author Charles Fry
     * @since 11.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public interface LoadingCache<K, V> extends Cache<K, V>, Function<K, V> {
    
      /**
       * Returns the value associated with {@code key} in this cache, first loading that value if
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sat Aug 06 17:12:03 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/cache/LoadingCache.java

     * @param <V> the type of the cache's values, which are not permitted to be null
     * @author Charles Fry
     * @since 11.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public interface LoadingCache<K, V> extends Cache<K, V>, Function<K, V> {
    
      /**
       * Returns the value associated with {@code key} in this cache, first loading that value if
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Sat Aug 06 17:12:03 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/EmptyCachesTest.java

      private Iterable<LoadingCache<Object, Object>> caches() {
        // lots of different ways to configure a LoadingCache
        CacheBuilderFactory factory = cacheFactory();
        return Iterables.transform(
            factory.buildAllPermutations(),
            new Function<CacheBuilder<Object, Object>, LoadingCache<Object, Object>>() {
              @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/cache/ForwardingLoadingCache.java

       * constructed {@link LoadingCache} as the delegate.
       *
       * @since 10.0
       */
      public abstract static class SimpleForwardingLoadingCache<K, V>
          extends ForwardingLoadingCache<K, V> {
        private final LoadingCache<K, V> delegate;
    
        protected SimpleForwardingLoadingCache(LoadingCache<K, V> delegate) {
          this.delegate = Preconditions.checkNotNull(delegate);
        }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sat Aug 06 17:12:03 GMT 2022
    - 2.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        LoadingCache<String, Integer> cache =
            CacheBuilder.newBuilder()
                .expireAfterAccess(EXPIRING_TIME, MILLISECONDS)
                .removalListener(removalListener)
                .ticker(ticker)
                .build(loader);
        checkExpiration(cache, loader, ticker, removalListener);
      }
    
      private void checkExpiration(
          LoadingCache<String, Integer> cache,
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheLoadingTest.java

      }
    
      /**
       * Make sure LoadingCache correctly wraps ExecutionExceptions and UncheckedExecutionExceptions.
       */
      public void testLoadingExceptionWithCause() {
        final Exception cause = new Exception();
        final UncheckedExecutionException uee = new UncheckedExecutionException(cause);
        final ExecutionException ee = new ExecutionException(cause);
    
        LoadingCache<Object, Object> cacheUnchecked =
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java

    import junit.framework.TestCase;
    
    /**
     * Unit test for {@link ForwardingLoadingCache}.
     *
     * @author Charles Fry
     */
    public class ForwardingLoadingCacheTest extends TestCase {
      private LoadingCache<String, Boolean> forward;
      private LoadingCache<String, Boolean> mock;
    
      @SuppressWarnings({"unchecked", "DoNotMock"}) // mock
      @Override
      public void setUp() throws Exception {
        super.setUp();
        /*
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/AbstractLoadingCacheTest.java

    public class AbstractLoadingCacheTest extends TestCase {
    
      public void testGetUnchecked_checked() {
        final Exception cause = new Exception();
        final AtomicReference<Object> valueRef = new AtomicReference<>();
        LoadingCache<Object, Object> cache =
            new AbstractLoadingCache<Object, Object>() {
              @Override
              public Object get(Object key) throws ExecutionException {
                Object v = valueRef.get();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        LoadingCache<String, Integer> cache =
            CacheBuilder.newBuilder()
                .expireAfterAccess(EXPIRING_TIME, MILLISECONDS)
                .removalListener(removalListener)
                .ticker(ticker)
                .build(loader);
        checkExpiration(cache, loader, ticker, removalListener);
      }
    
      private void checkExpiration(
          LoadingCache<String, Integer> cache,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  10. guava/src/com/google/common/cache/CacheLoader.java

       *
       * <p>This method should be overridden when bulk retrieval is significantly more efficient than
       * many individual lookups. Note that {@link LoadingCache#getAll} will defer to individual calls
       * to {@link LoadingCache#get} if this method is not overridden.
       *
       * @param keys the unique, non-null keys whose values should be loaded
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Dec 19 20:20:14 GMT 2022
    - 9.5K bytes
    - Viewed (0)
Back to top