Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for expireAfterWrite (0.14 sec)

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

            .addEqualityGroup(parse("expireAfterAccess=60m"), parse("expireAfterAccess=1h"))
            .addEqualityGroup(parse("expireAfterWrite=60s"), parse("expireAfterWrite=1m"))
            .addEqualityGroup(parse("expireAfterWrite=60m"), parse("expireAfterWrite=1h"))
            .addEqualityGroup(parse("weakKeys"), parse("weakKeys"))
            .addEqualityGroup(parse("softValues"), parse("softValues"))
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

            .addEqualityGroup(parse("expireAfterAccess=60m"), parse("expireAfterAccess=1h"))
            .addEqualityGroup(parse("expireAfterWrite=60s"), parse("expireAfterWrite=1m"))
            .addEqualityGroup(parse("expireAfterWrite=60m"), parse("expireAfterWrite=1h"))
            .addEqualityGroup(parse("weakKeys"), parse("weakKeys"))
            .addEqualityGroup(parse("softValues"), parse("softValues"))
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

            CacheBuilder.newBuilder().expireAfterWrite(3600, SECONDS);
        assertThrows(IllegalStateException.class, () -> builder.expireAfterWrite(3600, SECONDS));
      }
    
      @GwtIncompatible // Duration
      public void testTimeToLive_setTwice_duration() {
        CacheBuilder<Object, Object> builder =
            CacheBuilder.newBuilder().expireAfterWrite(Duration.ofHours(1));
    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/CacheBuilderGwtTest.java

        fakeTicker.advance(1000, MILLISECONDS);
        assertEquals(null, cache.getIfPresent(0));
      }
    
      public void testExpireAfterWrite() {
        final Cache<Integer, Integer> cache =
            CacheBuilder.newBuilder().expireAfterWrite(1000, MILLISECONDS).ticker(fakeTicker).build();
    
        cache.put(10, 100);
        cache.put(20, 200);
        cache.put(4, 2);
    
        fakeTicker.advance(999, MILLISECONDS);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/CacheBuilder.java

       * @throws IllegalStateException if {@link #expireAfterWrite} was already set
       */
      @SuppressWarnings("GoodTime") // should accept a Duration
      @CanIgnoreReturnValue
      public CacheBuilder<K, V> expireAfterWrite(long duration, TimeUnit unit) {
        checkState(
            expireAfterWriteNanos == UNSET_INT,
            "expireAfterWrite was already set to %s ns",
            expireAfterWriteNanos);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 52K bytes
    - Viewed (0)
  6. guava/src/com/google/common/cache/CacheBuilder.java

       * @throws IllegalStateException if {@link #expireAfterWrite} was already set
       */
      @SuppressWarnings("GoodTime") // should accept a Duration
      @CanIgnoreReturnValue
      public CacheBuilder<K, V> expireAfterWrite(long duration, TimeUnit unit) {
        checkState(
            expireAfterWriteNanos == UNSET_INT,
            "expireAfterWrite was already set to %s ns",
            expireAfterWriteNanos);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

            ConcurrentMapTestSuiteBuilder.using(
                    new TestStringCacheGenerator(
                        createCacheBuilder()
                            .expireAfterWrite(1, SECONDS)
                            .ticker(new SerializableTicker())))
                .named("LocalCache with expireAfterWrite") // SerializableTicker never advances
                .withFeatures(
                    CollectionSize.ANY,
                    MapFeature.GENERAL_PURPOSE,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/LocalCacheTest.java

            ConcurrentMapTestSuiteBuilder.using(
                    new TestStringCacheGenerator(
                        createCacheBuilder()
                            .expireAfterWrite(1, SECONDS)
                            .ticker(new SerializableTicker())))
                .named("LocalCache with expireAfterWrite") // SerializableTicker never advances
                .withFeatures(
                    CollectionSize.ANY,
                    MapFeature.GENERAL_PURPOSE,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 112.3K bytes
    - Viewed (0)
  9. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

      private final Ticker ticker;
      private final long expireAfterWrite;
      private final long expireAfterAccess;
    
      LocalCache(CacheBuilder<? super K, ? super V> builder, CacheLoader<? super K, V> loader) {
        this.loader = loader;
        this.removalListener = builder.removalListener;
        this.expireAfterAccess = builder.expireAfterAccessNanos;
        this.expireAfterWrite = builder.expireAfterWriteNanos;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/NullCacheTest.java

        checkEmpty(cache);
      }
    
      public void testGet_expireAfterWrite() {
        Object computed = new Object();
        LoadingCache<Object, Object> cache =
            CacheBuilder.newBuilder()
                .expireAfterWrite(0, SECONDS)
                .removalListener(listener)
                .build(constantLoader(computed));
    
        Object key = new Object();
        assertSame(computed, cache.getUnchecked(key));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4.4K bytes
    - Viewed (0)
Back to top