Class 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 related ExoContainer because to be able to launch ispn instances in standalone mode we need to have a static configuration file.
    Version:
    $Id$
    Author:
    Nicolas Filotto
    • Field Detail

      • manager

        protected final org.infinispan.manager.EmbeddedCacheManager manager
        The infinispan cache manager
    • 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 a NullPointerException will be thrown
      • 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()