org.dozer.cache
Class DozerCacheManager

java.lang.Object
  extended by org.dozer.cache.DozerCacheManager
All Implemented Interfaces:
CacheManager

public final class DozerCacheManager
extends Object
implements CacheManager

Internal class that manages the Dozer caches. Only intended for internal use.

Author:
tierney.matt

Constructor Summary
DozerCacheManager()
           
 
Method Summary
 void addCache(Cache cache)
           
 void addCache(String name, int maxElementsInMemory)
           
 boolean cacheExists(String name)
           
 void clearAllEntries()
          Clears all available caches.
 Cache getCache(String name)
          Get Cache object by name.
 Collection<String> getCacheNames()
          Returns a Set of all Cache names
 Collection<Cache> getCaches()
           
 void logCaches()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DozerCacheManager

public DozerCacheManager()
Method Detail

getCaches

public Collection<Cache> getCaches()
Specified by:
getCaches in interface CacheManager

getCache

public Cache getCache(String name)
Description copied from interface: CacheManager
Get Cache object by name.

Specified by:
getCache in interface CacheManager
Parameters:
name - unique cache name
Returns:
Cache object or will throw MappingException in case Cache is not registered.

addCache

public void addCache(String name,
                     int maxElementsInMemory)
Specified by:
addCache in interface CacheManager

addCache

public void addCache(Cache cache)

getCacheNames

public Collection<String> getCacheNames()
Description copied from interface: CacheManager
Returns a Set of all Cache names

Specified by:
getCacheNames in interface CacheManager
Returns:
Set of String objects representing Cache names.

clearAllEntries

public void clearAllEntries()
Description copied from interface: CacheManager
Clears all available caches. Should not be used in production. Can be applied on "soft" application restart.

Specified by:
clearAllEntries in interface CacheManager

cacheExists

public boolean cacheExists(String name)
Specified by:
cacheExists in interface CacheManager

logCaches

public void logCaches()


Copyright © 2005-2011 dozer. All Rights Reserved.