Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for StatsCounter (0.04 sec)

  1. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

        Timestamped<V> value = cachingHashMap.get(key);
    
        if (value == null) {
          statsCounter.recordMisses(1);
          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.
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 21.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/AbstractCacheTest.java

     */
    
    package com.google.common.cache;
    
    import static com.google.common.truth.Truth.assertThat;
    
    import com.google.common.cache.AbstractCache.SimpleStatsCounter;
    import com.google.common.cache.AbstractCache.StatsCounter;
    import com.google.common.collect.ImmutableList;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.concurrent.atomic.AtomicReference;
    import junit.framework.TestCase;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/cache/AbstractCache.java

         * it may be interleaved with update operations.
         */
        CacheStats snapshot();
      }
    
      /**
       * A thread-safe {@link StatsCounter} implementation for use by {@link Cache} implementors.
       *
       * @since 10.0
       */
      public static final class SimpleStatsCounter implements StatsCounter {
        private final LongAddable hitCount = LongAddables.create();
        private final LongAddable missCount = LongAddables.create();
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/cache/CacheBuilder.java

       *   https://github.com/google/guava/issues/6565
       */
      @SuppressWarnings("AnonymousToLambda")
      static final Supplier<StatsCounter> CACHE_STATS_COUNTER =
          new Supplier<StatsCounter>() {
            @Override
            public StatsCounter get() {
              return new SimpleStatsCounter();
            }
          };
    
      enum NullListener implements RemovalListener<Object, Object> {
        INSTANCE;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Oct 08 18:55:33 UTC 2025
    - 51.9K bytes
    - Viewed (0)
  5. guava/src/com/google/common/cache/AbstractCache.java

         * it may be interleaved with update operations.
         */
        CacheStats snapshot();
      }
    
      /**
       * A thread-safe {@link StatsCounter} implementation for use by {@link Cache} implementors.
       *
       * @since 10.0
       */
      public static final class SimpleStatsCounter implements StatsCounter {
        private final LongAddable hitCount = LongAddables.create();
        private final LongAddable missCount = LongAddables.create();
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  6. guava/src/com/google/common/cache/LocalCache.java

        /** Accumulates cache statistics. */
        final StatsCounter statsCounter;
    
        Segment(
            LocalCache<K, V> map,
            int initialCapacity,
            long maxSegmentWeight,
            StatsCounter statsCounter) {
          this.map = map;
          this.maxSegmentWeight = maxSegmentWeight;
          this.statsCounter = checkNotNull(statsCounter);
          initTable(newEntryArray(initialCapacity));
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Sep 11 19:35:11 UTC 2025
    - 148.9K bytes
    - Viewed (0)
  7. guava/src/com/google/common/cache/CacheBuilder.java

       *   https://github.com/google/guava/issues/6565
       */
      @SuppressWarnings("AnonymousToLambda")
      static final Supplier<StatsCounter> CACHE_STATS_COUNTER =
          new Supplier<StatsCounter>() {
            @Override
            public StatsCounter get() {
              return new SimpleStatsCounter();
            }
          };
    
      enum NullListener implements RemovalListener<Object, Object> {
        INSTANCE;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Oct 08 18:55:33 UTC 2025
    - 51.6K bytes
    - Viewed (0)
Back to top