Share via


LruCache.EntryRemoved(Boolean, Object, Object, Object) Method

Definition

Called for entries that have been evicted or removed.

[Android.Runtime.Register("entryRemoved", "(ZLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V", "GetEntryRemoved_ZLjava_lang_Object_Ljava_lang_Object_Ljava_lang_Object_Handler")]
protected virtual void EntryRemoved (bool evicted, Java.Lang.Object? key, Java.Lang.Object? oldValue, Java.Lang.Object? newValue);
[<Android.Runtime.Register("entryRemoved", "(ZLjava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V", "GetEntryRemoved_ZLjava_lang_Object_Ljava_lang_Object_Ljava_lang_Object_Handler")>]
abstract member EntryRemoved : bool * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> unit
override this.EntryRemoved : bool * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> unit

Parameters

evicted
Boolean

true if the entry is being removed to make space, false if the removal was caused by a #put or #remove.

key
Object
oldValue
Object
newValue
Object

the new value for key, if it exists. If non-null, this removal was caused by a #put or a #get. Otherwise it was caused by an eviction or a #remove.

Attributes

Remarks

Called for entries that have been evicted or removed. This method is invoked when a value is evicted to make space, removed by a call to #remove, or replaced by a call to #put. The default implementation does nothing.

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

Java documentation for android.util.LruCache.entryRemoved(boolean, K, V, V).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to