public class ExoCacheFactoryImpl extends Object implements ExoCacheFactory
ExoCacheFactory| Constructor and Description |
|---|
ExoCacheFactoryImpl(ExoContainerContext ctx,
InitParams params,
ConfigurationManager configManager) |
ExoCacheFactoryImpl(ExoContainerContext ctx,
InitParams params,
ConfigurationManager configManager,
DistributedCacheManager dcm) |
ExoCacheFactoryImpl(ExoContainerContext ctx,
String cacheConfigTemplate,
String cacheAsyncConfigTemplate,
ConfigurationManager configManager,
DistributedCacheManager dcm) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfig(ExoCacheFactoryConfigPlugin plugin)
Add a list of custom configuration to register
|
void |
addCreator(ExoCacheCreatorPlugin plugin)
Add a list of creators to register
|
ExoCache<Serializable,Object> |
createCache(ExoCacheConfig config)
To create a new cache instance according to the given configuration, we follow the steps below:
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.
|
protected ExoCacheCreator |
getExoCacheCreator(ExoCacheConfig config)
Returns the most relevant ExoCacheCreator according to the give configuration
|
protected void |
resetConfiguration(org.infinispan.configuration.cache.ConfigurationBuilder confBuilder)
Clean the configuration template to prevent conflicts
|
public ExoCacheFactoryImpl(ExoContainerContext ctx, InitParams params, ConfigurationManager configManager) throws ExoCacheInitException
ExoCacheInitExceptionpublic ExoCacheFactoryImpl(ExoContainerContext ctx, InitParams params, ConfigurationManager configManager, DistributedCacheManager dcm) throws ExoCacheInitException
ExoCacheInitExceptionpublic ExoCacheFactoryImpl(ExoContainerContext ctx, String cacheConfigTemplate, String cacheAsyncConfigTemplate, ConfigurationManager configManager, DistributedCacheManager dcm) throws ExoCacheInitException
ExoCacheInitExceptionpublic ExoCache<Serializable,Object> createCache(ExoCacheConfig config) throws ExoCacheInitException
createCache in interface ExoCacheFactoryExoCacheInitExceptionpublic void addCreator(ExoCacheCreatorPlugin plugin)
plugin - the plugin that contains the creatorspublic void addConfig(ExoCacheFactoryConfigPlugin plugin)
plugin - the plugin that contains the configsprotected ExoCacheCreator getExoCacheCreator(ExoCacheConfig config)
protected void resetConfiguration(org.infinispan.configuration.cache.ConfigurationBuilder confBuilder)
Copyright © 2018 eXo Platform SAS. All Rights Reserved.