Interface InfinispanConnectionProvider

All Superinterfaces:
Provider
All Known Implementing Classes:
DefaultInfinispanConnectionProvider, RemoteInfinispanConnectionProvider

public interface InfinispanConnectionProvider extends Provider
Author:
Stian Thorgersen
  • Field Details

  • Method Details

    • getCache

      default <K, V> org.infinispan.Cache<K,V> getCache(String name)
      Effectively the same as getCache(String, boolean) with createIfAbsent set to true
    • getCache

      <K, V> org.infinispan.Cache<K,V> getCache(String name, boolean createIfAbsent)
      Provides an instance if Infinispan cache by name
      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

      <K, V> org.infinispan.client.hotrod.RemoteCache<K,V> getRemoteCache(String name)
      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)
    • getTopologyInfo

      TopologyInfo getTopologyInfo()
      Returns:
      Information about cluster topology
    • migrateToProtoStream

      CompletionStage<Void> migrateToProtoStream()
      Migrates the JBoss Marshalling encoding to Infinispan ProtoStream
      Returns:
      A CompletionStage to signal when the operator is completed.
    • getExecutor

      default Executor getExecutor(String name)
      Returns an executor that will run the given tasks on a blocking thread as required.

      The Infinispan block Executor is used to execute blocking operation, like I/O. If Virtual Threads are enabled, this will be an executor with Virtual Threads.

      Parameters:
      name - The name for trace logging purpose.
      Returns:
      The Infinispan blocking Executor.
    • getScheduledExecutor

      ScheduledExecutorService getScheduledExecutor()
      Returns:
      The Infinispan ScheduledExecutorService. Long or blocking operations must not be executed directly.
    • getRemoteCache

      static <K, V> org.infinispan.client.hotrod.RemoteCache<K,V> getRemoteCache(KeycloakSessionFactory factory, String cacheName)
      Syntactic sugar to get a RemoteCache.
      See Also:
    • getBlockingManager

      org.infinispan.util.concurrent.BlockingManager getBlockingManager()
      Returns the Infinispan BlockingManager.

      The BlockingManager should be used to execute blocking operation like disk I/O. It offloads the task to the Infinispan blocking thread pool.

      Returns:
      The Infinispan BlockingManager.
    • skipSessionsCacheIfRequired

      static Stream<String> skipSessionsCacheIfRequired(Stream<String> caches)