info.magnolia.module.cache.ehcache
Class EhCacheFactory

java.lang.Object
  extended by info.magnolia.module.cache.ehcache.EhCacheFactory
All Implemented Interfaces:
CacheFactory

public class EhCacheFactory
extends Object
implements CacheFactory

A CacheFactory based on ehcache, which wraps BlockingCache instances.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Constructor Summary
EhCacheFactory(CacheMonitor cacheMonitor)
           
 
Method Summary
protected  void createCache(String name)
           
 int getBlockingTimeout()
           
 Cache getCache(String name)
          Retrieves a named cache.
 List getCacheNames()
           
 net.sf.ehcache.config.CacheConfiguration getDefaultCacheConfiguration()
           
 String getDiskStorePath()
           
 net.sf.ehcache.CacheManager getWrappedCacheManager()
           
 void setBlockingTimeout(int blockingTimeout)
           
 void setDefaultCacheConfiguration(net.sf.ehcache.config.CacheConfiguration defaultCacheConfiguration)
           
 void setDiskStorePath(String diskStorePath)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhCacheFactory

public EhCacheFactory(CacheMonitor cacheMonitor)
Method Detail

getDefaultCacheConfiguration

public net.sf.ehcache.config.CacheConfiguration getDefaultCacheConfiguration()

setDefaultCacheConfiguration

public void setDefaultCacheConfiguration(net.sf.ehcache.config.CacheConfiguration defaultCacheConfiguration)

getDiskStorePath

public String getDiskStorePath()

setDiskStorePath

public void setDiskStorePath(String diskStorePath)

getBlockingTimeout

public int getBlockingTimeout()

setBlockingTimeout

public void setBlockingTimeout(int blockingTimeout)

getCacheNames

public List getCacheNames()

getCache

public Cache getCache(String name)
Description copied from interface: CacheFactory
Retrieves a named cache. Implementations should take care of initializing the cache properly on first call or whenever necessary.

Specified by:
getCache in interface CacheFactory

createCache

protected void createCache(String name)

start

public void start()
Specified by:
start in interface CacheFactory

stop

public void stop()
Specified by:
stop in interface CacheFactory

getWrappedCacheManager

public net.sf.ehcache.CacheManager getWrappedCacheManager()


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.