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 java.lang.Object
implements CacheFactory

A CacheFactory based on ehcache, which wraps BlockingCache instances.

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

Constructor Summary
EhCacheFactory()
           
 
Method Summary
protected  void createCache(java.lang.String name)
           
 int getBlockingTimeout()
           
 Cache getCache(java.lang.String name)
          Retrieves a named cache.
 java.util.List getCacheNames()
           
 net.sf.ehcache.config.CacheConfiguration getDefaultCacheConfiguration()
           
 java.lang.String getDiskStorePath()
           
 net.sf.ehcache.CacheManager getWrappedCacheManager()
           
 void setBlockingTimeout(int blockingTimeout)
           
 void setDefaultCacheConfiguration(net.sf.ehcache.config.CacheConfiguration defaultCacheConfiguration)
           
 void setDiskStorePath(java.lang.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()
Method Detail

getDefaultCacheConfiguration

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

setDefaultCacheConfiguration

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

getDiskStorePath

public java.lang.String getDiskStorePath()

setDiskStorePath

public void setDiskStorePath(java.lang.String diskStorePath)

getBlockingTimeout

public int getBlockingTimeout()

setBlockingTimeout

public void setBlockingTimeout(int blockingTimeout)

getCacheNames

public java.util.List getCacheNames()

getCache

public Cache getCache(java.lang.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(java.lang.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-2010 Magnolia International Ltd.. All Rights Reserved.