@GwtCompatible public final class RemovalNotification<K,V> extends AbstractMap.SimpleImmutableEntry<K,V>
Map.Entry instances associated with
CacheBuilder, this class holds
strong references to the key and value, regardless of the type of references the cache may be
|Modifier and Type||Method and Description|
Creates a new
Returns the cause for which the entry was removed.
equals, getKey, getValue, hashCode, setValue, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparingByKey, comparingByKey, comparingByValue, comparingByValue
public static <K,V> RemovalNotification<K,V> create(@Nullable K key, @Nullable V value, RemovalCause cause)
RemovalNotificationfor the given
valuepair, with the given
causefor the removal. The
nullif they were already garbage collected.
public RemovalCause getCause()
public boolean wasEvicted()
trueif there was an automatic removal due to eviction (the cause is neither
Copyright © 2010-2017. All Rights Reserved.