com.google.common.collect
Interface MapEvictionListener<K,V>

Type Parameters:
K - the type of keys being evicted
V - the type of values being evicted

Deprecated. use MapMaker.RemovalListener This class is scheduled for deletion from Guava in Guava release 11.0.

@Beta
@Deprecated
public interface MapEvictionListener<K,V>

An object that can receive a notification when an entry is evicted from a map.

An instance may be called concurrently by multiple threads to process different entries. Implementations of this interface should avoid performing blocking calls or synchronizing on shared resources.

Since:
7.0
Author:
Ben Manes

Method Summary
 void onEviction(K key, V value)
          Deprecated. Notifies the listener that an eviction has occurred.
 

Method Detail

onEviction

void onEviction(@Nullable
                K key,
                @Nullable
                V value)
Deprecated. 
Notifies the listener that an eviction has occurred. Eviction may be for reasons such as timed expiration, exceeding a maximum size, or due to garbage collection. Eviction notification does not occur due to manual removal.

Parameters:
key - the key of the entry that has already been evicted, or null if its reference was collected
value - the value of the entry that has already been evicted, or null if its reference was collected


Copyright © 2010-2011. All Rights Reserved.