eXo Kernel :: Cache Extension :: JBoss Cache Implementation 2.4.13-GA

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

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

public class ExoCacheFactoryImpl
extends Object
implements ExoCacheFactory, org.picocontainer.Startable

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


Field Summary
static String ALLOW_SHAREABLE_CACHE
          Indicate whether the JBoss Cache instance used can be shared with other caches
static boolean ALLOW_SHAREABLE_CACHE_DEFAULT
           
 
Constructor Summary
ExoCacheFactoryImpl(ExoContainerContext ctx, 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.Cache<Serializable,Object> cache, String region)
          Clean the configuration template to prevent conflicts
 ExoCache<Serializable,Object> 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
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOW_SHAREABLE_CACHE

public static final String ALLOW_SHAREABLE_CACHE
Indicate whether the JBoss Cache instance used can be shared with other caches

See Also:
Constant Field Values

ALLOW_SHAREABLE_CACHE_DEFAULT

public static final boolean ALLOW_SHAREABLE_CACHE_DEFAULT
See Also:
Constant Field Values
Constructor Detail

ExoCacheFactoryImpl

public ExoCacheFactoryImpl(ExoContainerContext ctx,
                           InitParams params,
                           ConfigurationManager configManager)
Method Detail

createCache

public ExoCache<Serializable,Object> 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
Throws:
ExoCacheInitException

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.Cache<Serializable,Object> cache,
                                          String region)
Clean the configuration template to prevent conflicts


start

public void start()
Specified by:
start in interface org.picocontainer.Startable
See Also:
Startable.start()

stop

public void stop()
Specified by:
stop in interface org.picocontainer.Startable
See Also:
Startable.stop()

eXo Kernel :: Cache Extension :: JBoss Cache Implementation 2.4.13-GA

Copyright © 2015 eXo Platform SAS. All Rights Reserved.