Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for LocalManualCache (0.12 sec)

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

        SerializableWeigher<Object, Object> weigher = new SerializableWeigher<>();
        Ticker ticker = new SerializableTicker();
        @SuppressWarnings("unchecked") // createMock
        LocalManualCache<Object, Object> one =
            (LocalManualCache)
                CacheBuilder.newBuilder()
                    .weakKeys()
                    .softValues()
                    .expireAfterAccess(123, NANOSECONDS)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/LocalCacheTest.java

        SerializableWeigher<Object, Object> weigher = new SerializableWeigher<>();
        Ticker ticker = new SerializableTicker();
        @SuppressWarnings("unchecked") // createMock
        LocalManualCache<Object, Object> one =
            (LocalManualCache)
                CacheBuilder.newBuilder()
                    .weakKeys()
                    .softValues()
                    .expireAfterAccess(123, NANOSECONDS)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 112.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

      public void testMaximumSize_largerThanInt() {
        CacheBuilder<Object, Object> builder =
            CacheBuilder.newBuilder().initialCapacity(512).maximumSize(Long.MAX_VALUE);
        LocalCache<?, ?> cache = ((LocalCache.LocalManualCache<?, ?>) builder.build()).localCache;
        assertThat(cache.segments.length * cache.segments[0].table.length()).isEqualTo(512);
      }
    
      @GwtIncompatible // maximumWeight
      public void testMaximumWeight_negative() {
    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/src/com/google/common/cache/LocalCache.java

          return autoDelegate;
        }
      }
    
      static class LocalManualCache<K, V> implements Cache<K, V>, Serializable {
        final LocalCache<K, V> localCache;
    
        LocalManualCache(CacheBuilder<? super K, ? super V> builder) {
          this(new LocalCache<>(builder, null));
        }
    
        private LocalManualCache(LocalCache<K, V> localCache) {
          this.localCache = localCache;
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 149.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/CacheBuilder.java

       * @since 11.0
       */
      public <K1 extends K, V1 extends V> Cache<K1, V1> build() {
        checkWeightWithWeigher();
        checkNonLoadingCache();
        return new LocalCache.LocalManualCache<>(this);
      }
    
      private void checkNonLoadingCache() {
        checkState(refreshNanos == UNSET_INT, "refreshAfterWrite requires a LoadingCache");
      }
    
      private void checkWeightWithWeigher() {
    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

       * @since 11.0
       */
      public <K1 extends K, V1 extends V> Cache<K1, V1> build() {
        checkWeightWithWeigher();
        checkNonLoadingCache();
        return new LocalCache.LocalManualCache<>(this);
      }
    
      private void checkNonLoadingCache() {
        checkState(refreshNanos == UNSET_INT, "refreshAfterWrite requires a LoadingCache");
      }
    
      private void checkWeightWithWeigher() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
Back to top