Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for LoadingCache (0.19 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 Apr 26 12:43:10 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/PopulatedCachesTest.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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 15K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/NullCacheTest.java

    import com.google.common.cache.TestingRemovalListeners.QueuingRemovalListener;
    import com.google.common.util.concurrent.UncheckedExecutionException;
    import junit.framework.TestCase;
    
    /**
     * {@link LoadingCache} tests for caches with a maximum size of zero.
     *
     * @author mike nonemacher
     */
    public class NullCacheTest extends TestCase {
      QueuingRemovalListener<Object, Object> listener;
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  5. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

    /** Unit tests for CacheBuilder. */
    @GwtCompatible(emulated = true)
    public class CacheBuilderTest extends TestCase {
    
      public void testNewBuilder() {
        CacheLoader<Object, Integer> loader = constantLoader(1);
    
        LoadingCache<String, Integer> cache =
            CacheBuilder.newBuilder().removalListener(countingRemovalListener()).build(loader);
    
        assertEquals(Integer.valueOf(1), cache.getUnchecked("one"));
        assertEquals(1, cache.size());
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  7. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.5K bytes
    - Viewed (0)
  8. 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)
  9. guava-tests/test/com/google/common/cache/PopulatedCachesTest.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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 15K bytes
    - Viewed (0)
  10. 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)
Back to top