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 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 Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.infinispan.manager.EmbeddedCacheManager
    The infinispan cache manager
  • Constructor Summary

    Constructors
    Constructor
    Description
    DistributedCacheManager(String configurationFile, Map<String,String> parameters, org.exoplatform.container.configuration.ConfigurationManager configManager)
    Default constructor
    DistributedCacheManager(org.exoplatform.container.xml.InitParams params, org.exoplatform.container.configuration.ConfigurationManager configManager)
    Default constructor
    DistributedCacheManager(org.exoplatform.container.xml.InitParams params, org.exoplatform.container.configuration.ConfigurationManager configManager, org.exoplatform.services.transaction.TransactionService ts)
    Default constructor
  • Method Summary

    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 a NullPointerException will be thrown
    void
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • manager

      protected final org.infinispan.manager.EmbeddedCacheManager manager
      The infinispan cache manager
  • Constructor Details

    • 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 Details

    • 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()