Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 271 for cache (0.12 sec)

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

            assertTrue(cache.asMap().remove(key, value));
            assertFalse(cache.asMap().remove(key, -1));
            assertFalse(cache.asMap().containsKey(key));
          }
          checkEmpty(cache);
        }
      }
    
    
      public void testKeySet_populated() {
        for (LoadingCache<Object, Object> cache : caches()) {
          Set<Object> keys = cache.asMap().keySet();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 15K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/RemovalNotification.java

     * or implied. See the License for the specific language governing permissions and limitations under
     * the License.
     */
    
    package com.google.common.cache;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    
    import com.google.common.annotations.GwtCompatible;
    import java.util.AbstractMap.SimpleImmutableEntry;
    import javax.annotation.CheckForNull;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 01 20:46:24 GMT 2022
    - 2.5K bytes
    - Viewed (0)
  3. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java

            return importModel;
        }
    
        private static <T> T cache(
                ModelCache cache, String groupId, String artifactId, String version, String tag, Callable<T> supplier) {
            Supplier<T> s = asSupplier(supplier);
            if (cache == null) {
                return s.get();
            } else {
                return cache.computeIfAbsent(groupId, artifactId, version, tag, s);
            }
        }
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Fri May 03 08:48:38 GMT 2024
    - 61.5K bytes
    - Viewed (0)
  4. maven-core/src/test/java/org/apache/maven/project/artifact/DefaultProjectArtifactsCacheTest.java

    import org.junit.jupiter.api.Test;
    
    import static org.junit.jupiter.api.Assertions.assertArrayEquals;
    
    class DefaultProjectArtifactsCacheTest {
    
        private ProjectArtifactsCache cache;
    
        @BeforeEach
        void setUp() throws Exception {
            cache = new DefaultProjectArtifactsCache();
        }
    
        @Test
        void testProjectDependencyOrder() throws Exception {
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Dec 15 06:34:19 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        cache.put(654, 2675);
        cache.put(2456, 56);
        cache.put(2, 15);
    
        cache.invalidateAll();
        assertFalse(cache.asMap().containsKey(654));
        assertFalse(cache.asMap().containsKey(2456));
        assertFalse(cache.asMap().containsKey(2));
    
        cache.put(654, 2675);
        cache.put(2456, 56);
        cache.put(2, 15);
        cache.put(1, 3);
    
        cache.invalidateAll(ImmutableSet.of(1, 2));
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 15K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/MapRetrievalCache.java

        if (value != null) {
          return value;
        }
    
        // Store a local reference to the cache entry. If the backing map is immutable, this,
        // in combination with immutable cache entries, will ensure a thread-safe cache.
        CacheEntry<K, V> entry;
    
        // Check cache. We use == on purpose because it's cheaper and a cache miss is ok.
        entry = cacheEntry1;
        if (entry != null && entry.key == key) {
          return entry.value;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 3.2K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java

                      }
                    });
    
        // To start, fill up the cache.
        // Each miss both increments the counter and causes the map to grow by one,
        // so until evictions begin, the size of the map is the greatest return
        // value seen so far
        while (cache.getUnchecked(nextRandomKey()) < maximumSize) {}
    
        requests.set(0);
        misses.set(0);
      }
    
      @Benchmark
      int time(int reps) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/CacheTesting.java

        return Math.max(accessQueueSize(cache), writeQueueSize(cache));
      }
    
      static void processPendingNotifications(Cache<?, ?> cache) {
        if (hasLocalCache(cache)) {
          LocalCache<?, ?> cchm = toLocalCache(cache);
          cchm.processPendingNotifications();
        }
      }
    
      interface Receiver<T> {
        void accept(@Nullable T object);
      }
    
      /**
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/CacheEvictionTest.java

        assertEquals(MAX_SIZE, cache.size());
        CacheTesting.processPendingNotifications(cache);
        assertEquals(MAX_SIZE, removalListener.getCount());
        CacheTesting.checkValidState(cache);
      }
    
      /**
       * With an unlimited-size cache with maxWeight of 0, entries weighing 0 should still be cached.
       * Entries with positive weight should not be cached (nor dump existing cache).
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 14.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

            assertTrue(cache.asMap().remove(key, value));
            assertFalse(cache.asMap().remove(key, -1));
            assertFalse(cache.asMap().containsKey(key));
          }
          checkEmpty(cache);
        }
      }
    
    
      public void testKeySet_populated() {
        for (LoadingCache<Object, Object> cache : caches()) {
          Set<Object> keys = cache.asMap().keySet();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 15K bytes
    - Viewed (0)
Back to top