Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for RemovalNotification (0.2 sec)

  1. platforms/jvm/scala/src/main/java/org/gradle/api/internal/tasks/scala/GuavaBackedClassLoaderCache.java

    package org.gradle.api.internal.tasks.scala;
    
    
    import com.google.common.cache.Cache;
    import com.google.common.cache.CacheBuilder;
    import com.google.common.cache.RemovalListener;
    import com.google.common.cache.RemovalNotification;
    
    import java.util.concurrent.Callable;
    
    /**
     * Simple guava-based classloader cache. Usually used with a very small size (< 10),
     * as classloaders are strongly referenced.
     *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 15:43:33 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  2. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/LoggingEvictionListener.java

     */
    
    package org.gradle.cache.internal;
    
    import com.google.common.cache.Cache;
    import com.google.common.cache.RemovalCause;
    import com.google.common.cache.RemovalListener;
    import com.google.common.cache.RemovalNotification;
    import org.slf4j.Logger;
    
    import java.util.concurrent.atomic.AtomicInteger;
    
    class LoggingEvictionListener implements RemovalListener<Object, Object> {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:36 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/NullCacheTest.java

                .maximumSize(0)
                .removalListener(listener)
                .build(constantLoader(computed));
    
        Object key = new Object();
        assertSame(computed, cache.getUnchecked(key));
        RemovalNotification<Object, Object> notification = listener.remove();
        assertSame(key, notification.getKey());
        assertSame(computed, notification.getValue());
        assertSame(RemovalCause.SIZE, notification.getCause());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/NullCacheTest.java

                .maximumSize(0)
                .removalListener(listener)
                .build(constantLoader(computed));
    
        Object key = new Object();
        assertSame(computed, cache.getUnchecked(key));
        RemovalNotification<Object, Object> notification = listener.remove();
        assertSame(key, notification.getKey());
        assertSame(computed, notification.getValue());
        assertSame(RemovalCause.SIZE, notification.getCause());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        // contain the computed value (b -> b), since the clear() happened before the computation
        // completed.
        assertEquals(1, listener.size());
        RemovalNotification<String, String> notification = listener.remove();
        assertEquals("a", notification.getKey());
        assertEquals("a", notification.getValue());
        assertEquals(1, cache.size());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Oct 03 20:10:02 UTC 2023
    - 23.2K bytes
    - Viewed (0)
  6. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

      private long currentTimeNanos() {
        return ticker.read();
      }
    
      private void alertListenerIfPresent(K key, V value, RemovalCause cause) {
        if (removalListener != null) {
          removalListener.onRemoval(RemovalNotification.create(key, value, cause));
        }
      }
    
      @SuppressWarnings("GoodTime") // timestamps as numeric primitives
      private V load(K key) throws ExecutionException {
        long startTime = ticker.read();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        final int[] stats = new int[4];
    
        RemovalListener<Integer, Integer> countingListener =
            new RemovalListener<Integer, Integer>() {
              @Override
              public void onRemoval(RemovalNotification<Integer, Integer> notification) {
                switch (notification.getCause()) {
                  case EXPIRED:
                    stats[0]++;
                    break;
                  case EXPLICIT:
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Aug 05 17:21:46 UTC 2022
    - 15.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        RemovalListener<Integer, AtomicInteger> removalListener =
            new RemovalListener<Integer, AtomicInteger>() {
              @Override
              public void onRemoval(RemovalNotification<Integer, AtomicInteger> notification) {
                if (notification.wasEvicted()) {
                  evictionCount.incrementAndGet();
                  totalSum.addAndGet(notification.getValue().get());
                }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Aug 05 17:21:46 UTC 2022
    - 18.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/cache/LocalCache.java

          totalWeight -= weight;
          if (cause.wasEvicted()) {
            statsCounter.recordEviction();
          }
          if (map.removalNotificationQueue != DISCARDING_QUEUE) {
            RemovalNotification<K, V> notification = RemovalNotification.create(key, value, cause);
            map.removalNotificationQueue.offer(notification);
          }
        }
    
        /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sat May 18 03:24:34 UTC 2024
    - 143.6K bytes
    - Viewed (0)
  10. guava/src/com/google/common/cache/LocalCache.java

          totalWeight -= weight;
          if (cause.wasEvicted()) {
            statsCounter.recordEviction();
          }
          if (map.removalNotificationQueue != DISCARDING_QUEUE) {
            RemovalNotification<K, V> notification = RemovalNotification.create(key, value, cause);
            map.removalNotificationQueue.offer(notification);
          }
        }
    
        /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sat May 18 03:24:34 UTC 2024
    - 149.2K bytes
    - Viewed (0)
Back to top