Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for removalListener (0.07 sec)

  1. guava/src/com/google/common/cache/RemovalListener.java

     *     Object} if any key is acceptable
     * @author Charles Fry
     * @since 10.0
     */
    @GwtCompatible
    @FunctionalInterface
    public interface RemovalListener<K, V> {
      /**
       * Notifies the listener that a removal occurred at some point in the past.
       *
       * <p>This does not always signify that the key is now absent from the cache, as it may have
       * already been re-added.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/RemovalListener.java

     * @param <V> the most general type of values this listener can listen for; for example {@code
     *     Object} if any key is acceptable
     * @author Charles Fry
     * @since 10.0
     */
    @GwtCompatible
    public interface RemovalListener<K, V> {
      /**
       * Notifies the listener that a removal occurred at some point in the past.
       *
       * <p>This does not always signify that the key is now absent from the cache, as it may have
       * already been re-added.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/cache/RemovalListeners.java

     */
    @GwtIncompatible
    public final class RemovalListeners {
    
      private RemovalListeners() {}
    
      /**
       * Returns a {@code RemovalListener} which processes all eviction notifications using {@code
       * executor}.
       *
       * @param listener the backing listener
       * @param executor the executor with which removal notifications are asynchronously executed
       */
      public static <K, V> RemovalListener<K, V> asynchronous(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/TestingRemovalListeners.java

    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Utility {@link RemovalListener} implementations intended for use in testing.
     *
     * @author mike nonemacher
     */
    @GwtCompatible
    @NullUnmarked
    final class TestingRemovalListeners {
    
      /** Returns a new no-op {@code RemovalListener}. */
      static <K, V> NullRemovalListener<K, V> nullRemovalListener() {
        return new NullRemovalListener<>();
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/NullCacheTest.java

      }
    
      public void testGet() {
        Object computed = new Object();
        LoadingCache<Object, Object> cache =
            CacheBuilder.newBuilder()
                .maximumSize(0)
                .removalListener(listener)
                .build(constantLoader(computed));
    
        Object key = new Object();
        assertSame(computed, cache.getUnchecked(key));
        RemovalNotification<Object, Object> notification = listener.remove();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/NullCacheTest.java

      }
    
      public void testGet() {
        Object computed = new Object();
        LoadingCache<Object, Object> cache =
            CacheBuilder.newBuilder()
                .maximumSize(0)
                .removalListener(listener)
                .build(constantLoader(computed));
    
        Object key = new Object();
        assertSame(computed, cache.getUnchecked(key));
        RemovalNotification<Object, Object> notification = listener.remove();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/LocalCacheMapComputeTest.java

        List<RemovalNotification<Integer, Integer>> notifications = new ArrayList<>();
        Cache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .removalListener(
                    new RemovalListener<Integer, Integer>() {
                      @Override
                      public void onRemoval(RemovalNotification<Integer, Integer> notification) {
                        notifications.add(notification);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 6.4K bytes
    - Viewed (0)
Back to top