Class SpringEmbeddedCacheManager

java.lang.Object
org.infinispan.spring.embedded.provider.SpringEmbeddedCacheManager
All Implemented Interfaces:
org.springframework.cache.CacheManager

public class SpringEmbeddedCacheManager extends Object implements org.springframework.cache.CacheManager

A CacheManager implementation that is backed by an Infinispan EmbeddedCacheManager instance.

Note that this CacheManager does support adding new Caches at runtime, i.e. Caches added programmatically to the backing EmbeddedCacheManager after this CacheManager has been constructed will be seen by this CacheManager.

Author:
Olaf Bergner, Marius Bogoevici
  • Constructor Details

    • SpringEmbeddedCacheManager

      public SpringEmbeddedCacheManager(org.infinispan.manager.EmbeddedCacheManager nativeCacheManager)
      Parameters:
      nativeCacheManager - Underlying cache manager
    • SpringEmbeddedCacheManager

      public SpringEmbeddedCacheManager(org.infinispan.manager.EmbeddedCacheManager nativeCacheManager, boolean reactive)
      Parameters:
      nativeCacheManager - Underlying cache manager
  • Method Details

    • getCache

      public org.infinispan.spring.common.provider.SpringCache getCache(String name)
      Specified by:
      getCache in interface org.springframework.cache.CacheManager
    • getCacheNames

      public Collection<String> getCacheNames()
      Specified by:
      getCacheNames in interface org.springframework.cache.CacheManager
    • getNativeCacheManager

      public org.infinispan.manager.EmbeddedCacheManager getNativeCacheManager()
      Return the org.infinispan.manager.EmbeddedCacheManager that backs this CacheManager.
      Returns:
      The org.infinispan.manager.EmbeddedCacheManager that backs this CacheManager
    • stop

      public void stop()
      Stop the EmbeddedCacheManager this CacheManager delegates to.