Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for refreshAfterWrite (0.3 sec)

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

        assertThrows(IllegalArgumentException.class, () -> builder.refreshAfterWrite(Duration.ZERO));
      }
    
      @GwtIncompatible // refreshAfterWrite
      public void testRefresh_setTwice() {
        CacheBuilder<Object, Object> builder =
            CacheBuilder.newBuilder().refreshAfterWrite(3600, SECONDS);
        assertThrows(IllegalStateException.class, () -> builder.refreshAfterWrite(3600, SECONDS));
      }
    
      @GwtIncompatible // Duration
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/CacheBuilder.java

        "Java7ApiChecker",
      })
      @IgnoreJRERequirement // No more dangerous than wherever the caller got the Duration from
      @CanIgnoreReturnValue
      public CacheBuilder<K, V> refreshAfterWrite(Duration duration) {
        return refreshAfterWrite(toNanosSaturated(duration), NANOSECONDS);
      }
    
      /**
       * Specifies that active entries are eligible for automatic refresh once a fixed duration has
    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/src/com/google/common/cache/CacheBuilder.java

       */
      @J2ObjCIncompatible
      @GwtIncompatible // Duration
      @SuppressWarnings("GoodTime") // Duration decomposition
      @CanIgnoreReturnValue
      public CacheBuilder<K, V> refreshAfterWrite(Duration duration) {
        return refreshAfterWrite(toNanosSaturated(duration), NANOSECONDS);
      }
    
      /**
       * Specifies that active entries are eligible for automatic refresh once a fixed duration has
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

              }
            };
    
        LoadingCache<Object, Object> cache =
            CacheBuilder.newBuilder()
                .recordStats()
                .ticker(ticker)
                .refreshAfterWrite(1, MILLISECONDS)
                .build(loader);
        Object key = new Object();
        CacheStats stats = cache.stats();
        assertEquals(0, stats.missCount());
        assertEquals(0, stats.loadSuccessCount());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 86.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

      }
    
      public void testSetRefresh() {
        long duration = 42;
        TimeUnit unit = SECONDS;
        LocalCache<Object, Object> map =
            makeLocalCache(createCacheBuilder().refreshAfterWrite(duration, unit));
        assertEquals(unit.toNanos(duration), map.refreshNanos);
      }
    
      public void testLongAsyncRefresh() throws Exception {
        FakeTicker ticker = new FakeTicker();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/LocalCacheTest.java

      }
    
      public void testSetRefresh() {
        long duration = 42;
        TimeUnit unit = SECONDS;
        LocalCache<Object, Object> map =
            makeLocalCache(createCacheBuilder().refreshAfterWrite(duration, unit));
        assertEquals(unit.toNanos(duration), map.refreshNanos);
      }
    
      public void testLongAsyncRefresh() throws Exception {
        FakeTicker ticker = new FakeTicker();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 112.3K bytes
    - Viewed (0)
Back to top