Class DefaultInfinispanConnectionProvider

java.lang.Object
org.keycloak.connections.infinispan.DefaultInfinispanConnectionProvider
All Implemented Interfaces:
InfinispanConnectionProvider, Provider

public class DefaultInfinispanConnectionProvider extends Object implements InfinispanConnectionProvider
Author:
Stian Thorgersen
  • Constructor Details

    • DefaultInfinispanConnectionProvider

      public DefaultInfinispanConnectionProvider(org.infinispan.manager.EmbeddedCacheManager cacheManager, RemoteCacheProvider remoteCacheProvider, TopologyInfo topologyInfo)
  • Method Details

    • getCache

      public <K, V> org.infinispan.Cache<K,V> getCache(String name, boolean createIfAbsent)
      Description copied from interface: InfinispanConnectionProvider
      Provides an instance if Infinispan cache by name
      Specified by:
      getCache in interface InfinispanConnectionProvider
      Type Parameters:
      K - key type
      V - value type
      Parameters:
      name - name of the requested cache
      createIfAbsent - if true the connection provider will create the requested cache on method call if it does not exist
      Returns:
      return a cache instance
    • getRemoteCache

      public <K, V> org.infinispan.client.hotrod.RemoteCache<K,V> getRemoteCache(String cacheName)
      Description copied from interface: InfinispanConnectionProvider
      Get remote cache of given name. Could just retrieve the remote cache from the remoteStore configured in given infinispan cache and/or alternatively return the secured remoteCache (remoteCache corresponding to secured hotrod endpoint)
      Specified by:
      getRemoteCache in interface InfinispanConnectionProvider
    • getTopologyInfo

      public TopologyInfo getTopologyInfo()
      Specified by:
      getTopologyInfo in interface InfinispanConnectionProvider
      Returns:
      Information about cluster topology
    • close

      public void close()
      Specified by:
      close in interface Provider