Package org.exoplatform.services.ispn
Class DistributedCacheManager
- java.lang.Object
-
- org.exoplatform.services.ispn.DistributedCacheManager
-
- All Implemented Interfaces:
org.picocontainer.Startable
public class DistributedCacheManager extends Object implements org.picocontainer.Startable
This class is used to allow to use infinispan in distribution mode with the ability to launch infinispan instances in standalone mode, in other words outside an application server. To make it possible we will need to share the same cache instance whatever the relatedExoContainerbecause to be able to launch ispn instances in standalone mode we need to have a static configuration file.- Version:
- $Id$
- Author:
- Nicolas Filotto
-
-
Field Summary
Fields Modifier and Type Field Description protected org.infinispan.manager.EmbeddedCacheManagermanagerThe infinispan cache manager
-
Constructor Summary
Constructors Constructor Description DistributedCacheManager(String configurationFile, Map<String,String> parameters, org.exoplatform.container.configuration.ConfigurationManager configManager)Default constructorDistributedCacheManager(org.exoplatform.container.xml.InitParams params, org.exoplatform.container.configuration.ConfigurationManager configManager)Default constructorDistributedCacheManager(org.exoplatform.container.xml.InitParams params, org.exoplatform.container.configuration.ConfigurationManager configManager, org.exoplatform.services.transaction.TransactionService ts)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
org.infinispan.Cache<K,V>getCache(String cacheName)Gives the cache corresponding to the given name if it doesn't exist aNullPointerExceptionwill be thrownvoidstart()voidstop()
-
-
-
Constructor Detail
-
DistributedCacheManager
public DistributedCacheManager(String configurationFile, Map<String,String> parameters, org.exoplatform.container.configuration.ConfigurationManager configManager)
Default constructor
-
DistributedCacheManager
public DistributedCacheManager(org.exoplatform.container.xml.InitParams params, org.exoplatform.container.configuration.ConfigurationManager configManager)Default constructor
-
DistributedCacheManager
public DistributedCacheManager(org.exoplatform.container.xml.InitParams params, org.exoplatform.container.configuration.ConfigurationManager configManager, org.exoplatform.services.transaction.TransactionService ts)Default constructor
-
-
Method Detail
-
getCache
public <K,V> org.infinispan.Cache<K,V> getCache(String cacheName)
Gives the cache corresponding to the given name if it doesn't exist aNullPointerExceptionwill be thrown
-
start
public void start()
- Specified by:
startin interfaceorg.picocontainer.Startable- See Also:
Startable.start()
-
stop
public void stop()
- Specified by:
stopin interfaceorg.picocontainer.Startable- See Also:
Startable.stop()
-
-