Class SpringRemoteCacheManager

  • All Implemented Interfaces:
    org.springframework.cache.CacheManager

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

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

    Author:
    Olaf Bergner, Marius Bogoevici
    • Constructor Detail

      • SpringRemoteCacheManager

        public SpringRemoteCacheManager​(org.infinispan.client.hotrod.RemoteCacheManager nativeCacheManager,
                                        long readTimeout,
                                        long writeTimeout)
        Parameters:
        nativeCacheManager - the underlying cache manager
      • SpringRemoteCacheManager

        public SpringRemoteCacheManager​(org.infinispan.client.hotrod.RemoteCacheManager nativeCacheManager)
    • Method Detail

      • getCache

        public SpringCache getCache​(String name)
        Specified by:
        getCache in interface org.springframework.cache.CacheManager
        See Also:
        CacheManager.getCache(java.lang.String)
      • getCacheNames

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

        public org.infinispan.client.hotrod.RemoteCacheManager getNativeCacheManager()
        Return the org.infinispan.client.hotrod.RemoteCacheManager that backs this SpringRemoteCacheManager.
        Returns:
        The org.infinispan.client.hotrod.RemoteCacheManager that backs this SpringRemoteCacheManager
      • getReadTimeout

        public long getReadTimeout()
      • getWriteTimeout

        public long getWriteTimeout()
      • setReadTimeout

        public void setReadTimeout​(long readTimeout)
      • setWriteTimeout

        public void setWriteTimeout​(long writeTimeout)
      • start

        public void start()
        Start the org.infinispan.client.hotrod.RemoteCacheManager that backs this SpringRemoteCacheManager.
      • stop

        public void stop()
        Stop the org.infinispan.client.hotrod.RemoteCacheManager that backs this SpringRemoteCacheManager.