org.tbee.cache.simple
Interface Cache<K,V>
- All Superinterfaces:
- Map<K,V>
- All Known Implementing Classes:
- LeastRecentlyUsedCache, LifespanCache, TimeoutCache
public interface Cache<K,V>
- extends Map<K,V>
This is the main interface for this package.
All available caches implement this interface, so after instantiation they are exchangable.
The available caches are:
- HashMapCache: HashMap alike, does not automatically clean up entries.
- LeastRecentlyUsedCache: the number of items in the cache has a maximum, if a new item is added, the one longest not accessed is removed to make room for the new item.
- TimeoutCache: if an entry is not accessed for more than X time, it is removed from the cache.
- LifspanCache: slightly different from TimeoutCache; if an entry has been in the cache for more then X time, it is removed, regardless when it was last accessed.
The CacheListeners are both RemoveListeners (an item is removed from cache) and FinalizeListeners (an item is finalized).
- Version:
- $Revision: 1.3 $
- Author:
- $Author: tom $
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
addAssociation
void addAssociation(Object association)
addCacheListener
void addCacheListener(CacheListener pCacheListener)
getName
String getName()
removeCacheListener
void removeCacheListener(CacheListener pCacheListener)
removeValue
void removeValue(Object pValue)
setName
void setName(String pName)
Copyright © 2010 KnowledgePlaza. All Rights Reserved.