org.mmbase.cache
Class RelatedNodesCache

java.lang.Object
  extended byorg.mmbase.cache.Cache
      extended byorg.mmbase.cache.QueryResultCache
          extended byorg.mmbase.cache.RelatedNodesCache
All Implemented Interfaces:
Map, SizeMeasurable

public class RelatedNodesCache
extends QueryResultCache

Query result cache used for getRelatedNodes from MMObjectNodes. Entries are invalidated on the normal QueryResultCache way, but also if the one node from which the related nodes were requested is removed from the Node Cache itself.

Since:
MMBase-1.7
Version:
$Id: RelatedNodesCache.java,v 1.7 2006/06/23 14:17:39 johannes Exp $
Author:
Michiel Meeuwissen
See Also:
MMObjectNode.getRelatedNodes()

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
 
Fields inherited from class org.mmbase.cache.Cache
maxEntrySize
 
Method Summary
 void clear()
           
static RelatedNodesCache getCache()
           
 String getDescription()
          Gives a description for this cache type.
 String getName()
          Returns a name for this cache type.
 Object put(SearchQuery query, List queryResult)
          Puts a search result in this cache.
 Object remove(Object key)
          Removes an object from the cache.
 
Methods inherited from class org.mmbase.cache.QueryResultCache
addReleaseStrategies, addReleaseStrategy, getReleaseStrategy, observerIterator, put, toString
 
Methods inherited from class org.mmbase.cache.Cache
checkCachePolicy, contains, containsKey, containsValue, entrySet, equals, get, getByteSize, getByteSize, getCache, getCaches, getCheapByteSize, getCount, getDefaultMaxEntrySize, getHits, getMaxEntrySize, getMisses, getPuts, getRatio, getStats, getTotalByteSize, hashCode, isActive, isEmpty, keySet, main, maxSize, putAll, putCache, putCache, setActive, setMaxSize, size, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCache

public static RelatedNodesCache getCache()

getName

public String getName()
Description copied from class: Cache
Returns a name for this cache type. Default it is the class name, but this normally will be overriden.

Overrides:
getName in class Cache

getDescription

public String getDescription()
Description copied from class: Cache
Gives a description for this cache type. This can be used in cache overviews.

Overrides:
getDescription in class Cache

put

public Object put(SearchQuery query,
                  List queryResult)
Description copied from class: QueryResultCache
Puts a search result in this cache.

Overrides:
put in class QueryResultCache

remove

public Object remove(Object key)
Description copied from class: QueryResultCache
Removes an object from the cache. It alsos remove the watch from the observers which are watching this entry.

Specified by:
remove in interface Map
Overrides:
remove in class QueryResultCache
Parameters:
key - A SearchQuery object.

clear

public void clear()
Specified by:
clear in interface Map
Overrides:
clear in class QueryResultCache


MMBase build 1.8.1.20060716