Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for recordEviction (0.25 sec)

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

        for (int i = 0; i < 17; i++) {
          counter.recordLoadException(i);
        }
        for (int i = 0; i < 23; i++) {
          counter.recordMisses(1);
        }
        for (int i = 0; i < 27; i++) {
          counter.recordEviction();
        }
        CacheStats stats = counter.snapshot();
        int requestCount = 11 + 23;
        assertEquals(requestCount, stats.requestCount());
        assertEquals(11, stats.hitCount());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/AbstractCacheTest.java

        for (int i = 0; i < 17; i++) {
          counter.recordLoadException(i);
        }
        for (int i = 0; i < 23; i++) {
          counter.recordMisses(1);
        }
        for (int i = 0; i < 27; i++) {
          counter.recordEviction();
        }
        CacheStats stats = counter.snapshot();
        int requestCount = 11 + 23;
        assertEquals(requestCount, stats.requestCount());
        assertEquals(11, stats.hitCount());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/cache/AbstractCache.java

         * is evicted due to the cache's eviction strategy, and not as a result of manual {@linkplain
         * Cache#invalidate invalidations}.
         */
        void recordEviction();
    
        /**
         * Returns a snapshot of this counter's values. Note that this may be an inconsistent view, as
         * it may be interleaved with update operations.
         */
        CacheStats snapshot();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 9.1K bytes
    - Viewed (0)
  4. guava/src/com/google/common/cache/AbstractCache.java

         * is evicted due to the cache's eviction strategy, and not as a result of manual {@linkplain
         * Cache#invalidate invalidations}.
         */
        void recordEviction();
    
        /**
         * Returns a snapshot of this counter's values. Note that this may be an inconsistent view, as
         * it may be interleaved with update operations.
         */
        CacheStats snapshot();
      }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 9.1K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

          return null;
        } else if (!isExpired(value)) {
          statsCounter.recordHits(1);
          value.updateTimestamp();
          return value.getValue();
        } else {
          statsCounter.recordEviction();
          statsCounter.recordMisses(1);
          // `key` was in the cache, so it's a K.
          // (Or it's a weird case like a LinkedList in a Cache<ArrayList, ...>, but *shrug*.)
          @SuppressWarnings("unchecked")
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/cache/CacheBuilder.java

                @SuppressWarnings("GoodTime") // b/122668874
                @Override
                public void recordLoadException(long loadTime) {}
    
                @Override
                public void recordEviction() {}
    
                @Override
                public CacheStats snapshot() {
                  return EMPTY_STATS;
                }
              });
      static final CacheStats EMPTY_STATS = new CacheStats(0, 0, 0, 0, 0, 0);
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 51.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/cache/CacheBuilder.java

                @SuppressWarnings("GoodTime") // b/122668874
                @Override
                public void recordLoadException(long loadTime) {}
    
                @Override
                public void recordEviction() {}
    
                @Override
                public CacheStats snapshot() {
                  return EMPTY_STATS;
                }
              });
      static final CacheStats EMPTY_STATS = new CacheStats(0, 0, 0, 0, 0, 0);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/cache/LocalCache.java

        void enqueueNotification(
            @CheckForNull K key, int hash, @CheckForNull V value, int weight, RemovalCause cause) {
          totalWeight -= weight;
          if (cause.wasEvicted()) {
            statsCounter.recordEviction();
          }
          if (map.removalNotificationQueue != DISCARDING_QUEUE) {
            RemovalNotification<K, V> notification = RemovalNotification.create(key, value, cause);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 144.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/cache/LocalCache.java

        void enqueueNotification(
            @CheckForNull K key, int hash, @CheckForNull V value, int weight, RemovalCause cause) {
          totalWeight -= weight;
          if (cause.wasEvicted()) {
            statsCounter.recordEviction();
          }
          if (map.removalNotificationQueue != DISCARDING_QUEUE) {
            RemovalNotification<K, V> notification = RemovalNotification.create(key, value, cause);
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
Back to top