org.mmbase.cache
Class CacheManager

java.lang.Object
  extended byorg.mmbase.cache.CacheManager

public class CacheManager
extends Object

Cache manager manages the static methods of Cache. If you prefer you can call them on this in stead.

Since:
MMBase-1.8
Version:
$Id: CacheManager.java,v 1.6 2006/06/28 17:37:54 michiel Exp $

Constructor Summary
CacheManager()
           
 
Method Summary
static Cache getCache(String name)
          Returns the Cache with a certain name.
static Set getCaches()
          Returns the names of all caches.
static int getTotalByteSize()
           
protected static Cache putCache(Cache cache)
          Puts a cache in the caches repository.
static void shutdown()
          Clears and dereferences all caches.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheManager

public CacheManager()
Method Detail

getCache

public static Cache getCache(String name)
Returns the Cache with a certain name. To be used in combination with getCaches(). If you need a certain cache, you can just as well call the non-static 'getCache' which is normally in cache singletons.

See Also:
getCaches()

getCaches

public static Set getCaches()
Returns the names of all caches.

Returns:
A Set containing the names of all caches.

putCache

protected static Cache putCache(Cache cache)
Puts a cache in the caches repository. This function will be called in the static of childs, therefore it is protected.

Parameters:
cache - A cache.
Returns:
The previous cache of the same type (stored under the same name)

getTotalByteSize

public static int getTotalByteSize()

shutdown

public static void shutdown()
Clears and dereferences all caches. To be used on shutdown of MMBase.

Since:
MMBase-1.8.1


MMBase build 1.8.1.20060716