Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for cacheBuilder (0.07 sec)

  1. guava/src/com/google/common/cache/CacheBuilder.java

       */
      public static CacheBuilder<Object, Object> newBuilder() {
        return new CacheBuilder<>();
      }
    
      /**
       * Constructs a new {@code CacheBuilder} instance with the settings specified in {@code spec}.
       *
       * @since 12.0
       */
      @GwtIncompatible // To be supported
      public static CacheBuilder<Object, Object> from(CacheBuilderSpec spec) {
        return spec.toCacheBuilder().lenientParsing();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/CacheBuilder.java

       */
      public static CacheBuilder<Object, Object> newBuilder() {
        return new CacheBuilder<>();
      }
    
      /**
       * Constructs a new {@code CacheBuilder} instance with the settings specified in {@code spec}.
       *
       * @since 12.0
       */
      @GwtIncompatible // To be supported
      public static CacheBuilder<Object, Object> from(CacheBuilderSpec spec) {
        return spec.toCacheBuilder().lenientParsing();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 52K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().maximumSize(16);
        assertThrows(IllegalStateException.class, () -> builder.maximumSize(16));
      }
    
      @GwtIncompatible // maximumWeight
      public void testMaximumSize_andWeight() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().maximumSize(16);
        assertThrows(IllegalStateException.class, () -> builder.maximumWeight(16));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

      }
    
      public void testParse_accessExpirationSeconds() {
        CacheBuilderSpec spec = parse("expireAfterAccess=10s");
        assertEquals(SECONDS, spec.accessExpirationTimeUnit);
        assertEquals(10L, spec.accessExpirationDuration);
        assertCacheBuilderEquivalence(
            CacheBuilder.newBuilder().expireAfterAccess(10L, SECONDS), CacheBuilder.from(spec));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

      }
    
      public void testParse_accessExpirationSeconds() {
        CacheBuilderSpec spec = parse("expireAfterAccess=10s");
        assertEquals(SECONDS, spec.accessExpirationTimeUnit);
        assertEquals(10L, spec.accessExpirationDuration);
        assertCacheBuilderEquivalence(
            CacheBuilder.newBuilder().expireAfterAccess(10L, SECONDS), CacheBuilder.from(spec));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

                    stats[3]++;
                    break;
                  default:
                    throw new IllegalStateException("No collected exceptions in GWT CacheBuilder.");
                }
              }
            };
    
        Cache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .expireAfterWrite(1000, MILLISECONDS)
                .removalListener(countingListener)
                .ticker(fakeTicker)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/CacheEvictionTest.java

          LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().maximumSize(i).build(loader);
          assertEquals(i, CacheTesting.getTotalSegmentSize(cache));
        }
      }
    
      public void testEviction_setMaxSegmentWeight() {
        IdentityLoader<Object> loader = identityLoader();
        for (int i = 1; i < 1000; i++) {
          LoadingCache<Object, Object> cache =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 15K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

    public class LocalLoadingCacheTest extends TestCase {
    
      private static <K, V> LocalLoadingCache<K, V> makeCache(
          CacheBuilder<K, V> builder, CacheLoader<? super K, V> loader) {
        return new LocalLoadingCache<>(builder, loader);
      }
    
      private CacheBuilder<Object, Object> createCacheBuilder() {
        return CacheBuilder.newBuilder().recordStats();
      }
    
      // constructor tests
    
      public void testComputingFunction() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

    public class LocalLoadingCacheTest extends TestCase {
    
      private static <K, V> LocalLoadingCache<K, V> makeCache(
          CacheBuilder<K, V> builder, CacheLoader<? super K, V> loader) {
        return new LocalLoadingCache<>(builder, loader);
      }
    
      private CacheBuilder<Object, Object> createCacheBuilder() {
        return CacheBuilder.newBuilder().recordStats();
      }
    
      // constructor tests
    
      public void testComputingFunction() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

        final ExecutionException ee = new ExecutionException(cause);
    
        LoadingCache<Object, Object> cacheUnchecked =
            CacheBuilder.newBuilder().build(exceptionLoader(uee));
        LoadingCache<Object, Object> cacheChecked =
            CacheBuilder.newBuilder().build(exceptionLoader(ee));
    
        UncheckedExecutionException caughtUee =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 86.3K bytes
    - Viewed (0)
Back to top