Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for onRemoval (0.04 sec)

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

      @GwtIncompatible // ConcurrentLinkedQueue
      static class QueuingRemovalListener<K, V> extends ConcurrentLinkedQueue<RemovalNotification<K, V>>
          implements RemovalListener<K, V> {
    
        @Override
        public void onRemoval(RemovalNotification<K, V> notification) {
          add(notification);
        }
      }
    
      /**
       * {@link RemovalListener} that counts each {@link RemovalNotification} it receives, and provides
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  2. 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: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 21.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        AtomicInteger totalSum = new AtomicInteger();
    
        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: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 18.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

        RuntimeException e = new RuntimeException();
        RemovalListener<Object, Object> listener =
            new RemovalListener<Object, Object>() {
              @Override
              public void onRemoval(RemovalNotification<Object, Object> notification) {
                throw e;
              }
            };
    
        CacheBuilder<Object, Object> builder = createCacheBuilder().removalListener(listener);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 110.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/CacheBuilder.java

              return new SimpleStatsCounter();
            }
          };
    
      enum NullListener implements RemovalListener<Object, Object> {
        INSTANCE;
    
        @Override
        public void onRemoval(RemovalNotification<Object, Object> notification) {}
      }
    
      enum OneWeigher implements Weigher<Object, Object> {
        INSTANCE;
    
        @Override
        public int weigh(Object key, Object value) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 51.7K bytes
    - Viewed (0)
Back to top