Interface BitmapLruCache.OnEntryRemovedListener

  • Enclosing class:
    BitmapLruCache

    public static interface BitmapLruCache.OnEntryRemovedListener
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onEntryRemoved​(boolean evicted, java.lang.String key, android.graphics.Bitmap oldValue, android.graphics.Bitmap newValue)
      Called on entries that have been evicted or removed.
    • Method Detail

      • onEntryRemoved

        void onEntryRemoved​(boolean evicted,
                            @NonNull
                            java.lang.String key,
                            @NonNull
                            android.graphics.Bitmap oldValue,
                            @Nullable
                            android.graphics.Bitmap newValue)
        Called on entries that have been evicted or removed. This method is invoked when a value is evicted to make space, removed by a call to LruCache.remove(K), or replaced by a call to LruCache.put(K, V). The default implementation does nothing.

        The method is called without synchronization: other threads may access the cache while this method is executing.

        Parameters:
        evicted - true if the entry is being removed to make space, false if the removal was caused by a LruCache.put(K, V) or LruCache.remove(K).
        newValue - the new value for key, if it exists. If non-null, this removal was caused by a LruCache.put(K, V). Otherwise it was caused by an eviction or a LruCache.remove(K).