org.mmbase.cache
Class MultilevelCacheHandler

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--org.mmbase.util.LRUHashtable
                    |
                    +--org.mmbase.cache.Cache
                          |
                          +--org.mmbase.cache.MultilevelCacheHandler
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable, SizeMeasurable

public class MultilevelCacheHandler
extends Cache

This object handles cache multilevel tag cache requests. it removed invalid lines adding listeners to builders used in the multilevel query's

Version:
$Id: MultilevelCacheHandler.java,v 1.9.2.1 2002/11/26 22:39:39 kees Exp $
Author:
Daniel Ockeloen, Michiel Meeuwissen
See Also:
Serialized Form

Inner classes inherited from class org.mmbase.util.LRUHashtable
LRUHashtable.LRUEntry
 
Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Fields inherited from class org.mmbase.cache.Cache
maxEntrySize
 
Method Summary
 java.lang.Integer calcHashMultiLevel(StringTagger tagger)
          Create a hashcode for all the parameters in a multilevel request coming from the MMCI.
 void callbackRemove(java.lang.Object key)
          call the real remove in the LRU
 java.lang.Object get(java.lang.Object key)
          Like 'get' of LRUHashtable but considers if the cache is active or not.
static MultilevelCacheHandler getCache()
           
static Cache getCache(java.lang.String name)
          Returns the Cache with a certain name.
 java.lang.String getDescription()
          Gives a description for this cache type.
 java.lang.String getName()
          Returns a name for this cache type.
 java.lang.Object put(java.lang.Object hash, java.lang.Object o, java.util.Vector types, StringTagger tagger)
           
 java.lang.Object remove(java.lang.Object key)
          intercept remove of LRU to make sure we remove from all Observers first the clear will call the real remove
static void setMMBase(MMBase m)
           
 
Methods inherited from class org.mmbase.cache.Cache
getByteSize, getByteSize, getCaches, getDefaultMaxEntrySize, getMaxEntrySize, getTotalByteSize, isActive, main, put, putCache, putCache, setActive
 
Methods inherited from class org.mmbase.util.LRUHashtable
clear, clone, elements, entrySet, getCount, getHits, getMisses, getOrderedElements, getOrderedElements, getOrderedEntries, getOrderedEntries, getPuts, getRatio, getSize, getStats, keySet, setSize, size, toString, toString, values
 
Methods inherited from class java.util.Hashtable
contains, containsKey, containsValue, equals, hashCode, isEmpty, keys, putAll, rehash
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCache

public static MultilevelCacheHandler getCache()

getName

public java.lang.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 java.lang.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 java.lang.Object put(java.lang.Object hash,
                            java.lang.Object o,
                            java.util.Vector types,
                            StringTagger tagger)

setMMBase

public static void setMMBase(MMBase m)

getCache

public static Cache getCache(java.lang.String name)
Deprecated. use getCache

Description copied from class: Cache
Returns the Cache with a certain name. To be used in combination with getCaches().
Following copied from class: org.mmbase.cache.Cache
See Also:
Cache.getCaches()

get

public java.lang.Object get(java.lang.Object key)
Description copied from class: Cache
Like 'get' of LRUHashtable but considers if the cache is active or not.
Overrides:
get in class Cache
Following copied from class: org.mmbase.util.LRUHashtable
Parameters:
key - the key of the element
Returns:
the value of the element, or null if it could not be found

remove

public java.lang.Object remove(java.lang.Object key)
intercept remove of LRU to make sure we remove from all Observers first the clear will call the real remove
Overrides:
remove in class LRUHashtable
Following copied from class: org.mmbase.util.LRUHashtable
Parameters:
key - the key of the element
Returns:
the original value of the element if it existed, null if it could not be found

callbackRemove

public void callbackRemove(java.lang.Object key)
call the real remove in the LRU

calcHashMultiLevel

public java.lang.Integer calcHashMultiLevel(StringTagger tagger)
Create a hashcode for all the parameters in a multilevel request coming from the MMCI.


MMBase build 1.6.5.20030923