org.exoplatform.services.cache.impl.jboss
Class ExoCacheFactoryImpl

java.lang.Object
  extended by org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryImpl
All Implemented Interfaces:
ExoCacheFactory

public class ExoCacheFactoryImpl
extends Object
implements ExoCacheFactory

This class is the JBoss Cache implementation of the ExoCacheFactory Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com 17 juil. 2009


Constructor Summary
ExoCacheFactoryImpl(InitParams params, ConfigurationManager configManager)
           
 
Method Summary
 void addConfig(ExoCacheFactoryConfigPlugin plugin)
          Add a list of custom configuration to register
 void addCreator(ExoCacheCreatorPlugin plugin)
          Add a list of creators to register
protected  void cleanConfigurationTemplate(org.jboss.cache.TreeCache cache, String sRegion)
          Clean the configuration template to prevent conflicts
 ExoCache createCache(ExoCacheConfig config)
          To create a new cache instance according to the given configuration, we follow the steps below: 1.
protected  ExoCacheCreator getExoCacheCreator(ExoCacheConfig config)
          Returns the most relevant ExoCacheCreator according to the give configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExoCacheFactoryImpl

public ExoCacheFactoryImpl(InitParams params,
                           ConfigurationManager configManager)
Method Detail

createCache

public ExoCache createCache(ExoCacheConfig config)
                     throws ExoCacheInitException
To create a new cache instance according to the given configuration, we follow the steps below: 1. We first try to find if a specific location of the cache configuration has been defined thanks to an external component plugin of type ExoCacheFactoryConfigPlugin 2. If no specific location has been defined, we use the default configuration which is "${CACHE_CONFIG_TEMPLATE_KEY}"

Specified by:
createCache in interface ExoCacheFactory
Parameters:
config - the cache to create
Returns:
the new instance of ExoCache
Throws:
ExoCacheInitException - if an exception happens while initializing the cache

addCreator

public void addCreator(ExoCacheCreatorPlugin plugin)
Add a list of creators to register

Parameters:
plugin - the plugin that contains the creators

addConfig

public void addConfig(ExoCacheFactoryConfigPlugin plugin)
Add a list of custom configuration to register

Parameters:
plugin - the plugin that contains the configs

getExoCacheCreator

protected ExoCacheCreator getExoCacheCreator(ExoCacheConfig config)
Returns the most relevant ExoCacheCreator according to the give configuration


cleanConfigurationTemplate

protected void cleanConfigurationTemplate(org.jboss.cache.TreeCache cache,
                                          String sRegion)
Clean the configuration template to prevent conflicts



Copyright © 2009 eXo Platform SAS. All Rights Reserved.