com.googlecode.concurrentlinkedhashmap
Interface CapacityLimiter


public interface CapacityLimiter

A class that can determine the whether an entry should be evicted from the map. An instance is invoked under the map's eviction lock and will not block other threads from performing most common operations on the map.

An instance may be evaluated after every insertion or update operation on the map or triggered directly with ConcurrentLinkedHashMap.evictWith(CapacityLimiter). An implementation should be aware that the caller's thread will not expect long execution times or failures as a side effect of the capacity limiter being evaluated. Execution safety and a fast turn around time should be considered when implementing this interface.

Author:
ben.manes@gmail.com (Ben Manes)
See Also:
http://code.google.com/p/concurrentlinkedhashmap/

Method Summary
 boolean hasExceededCapacity(ConcurrentLinkedHashMap<?,?> map)
          Determines whether an entry should be evicted from the specified map.
 

Method Detail

hasExceededCapacity

boolean hasExceededCapacity(ConcurrentLinkedHashMap<?,?> map)
Determines whether an entry should be evicted from the specified map.

Parameters:
map - the map to evaluate for whether an eviction is required
Returns:
true if an entry should be evicted from the map


Copyright © 2011. All Rights Reserved.