Class DatabaseAwareClusterProvider

java.lang.Object
org.keycloak.cluster.infinispan.DatabaseAwareClusterProvider
All Implemented Interfaces:
org.keycloak.cluster.ClusterProvider, org.keycloak.provider.Provider

public class DatabaseAwareClusterProvider extends Object implements org.keycloak.cluster.ClusterProvider
Wraps an InfinispanClusterProvider and additionally persists events to the database for cross-cluster communication.
Author:
Alexander Schwartz
  • Constructor Details

    • DatabaseAwareClusterProvider

      public DatabaseAwareClusterProvider(org.keycloak.cluster.ClusterProvider delegate, org.keycloak.models.KeycloakSession session, NodeInfo nodeInfo, org.infinispan.commons.marshall.Marshaller marshaller, Duration awaitTimeout)
  • Method Details

    • getClusterStartupTime

      public int getClusterStartupTime()
      Specified by:
      getClusterStartupTime in interface org.keycloak.cluster.ClusterProvider
    • executeIfNotExecuted

      public <T> org.keycloak.cluster.ExecutionResult<T> executeIfNotExecuted(String taskKey, int taskTimeoutInSeconds, Callable<T> task)
      Specified by:
      executeIfNotExecuted in interface org.keycloak.cluster.ClusterProvider
    • isPrimaryCluster

      public boolean isPrimaryCluster()
      Specified by:
      isPrimaryCluster in interface org.keycloak.cluster.ClusterProvider
    • isPrimaryClusterSupported

      public boolean isPrimaryClusterSupported()
      Specified by:
      isPrimaryClusterSupported in interface org.keycloak.cluster.ClusterProvider
    • executeIfNotExecutedAsync

      public Future<Boolean> executeIfNotExecutedAsync(String taskKey, int taskTimeoutInSeconds, Callable task)
      Specified by:
      executeIfNotExecutedAsync in interface org.keycloak.cluster.ClusterProvider
    • registerListener

      public void registerListener(String taskKey, org.keycloak.cluster.ClusterListener task)
      Specified by:
      registerListener in interface org.keycloak.cluster.ClusterProvider
    • notify

      public void notify(String taskKey, org.keycloak.cluster.ClusterEvent event, boolean ignoreSender, org.keycloak.cluster.ClusterProvider.DCNotify dcNotify)
      Specified by:
      notify in interface org.keycloak.cluster.ClusterProvider
    • notify

      public void notify(String taskKey, org.keycloak.cluster.ClusterEvent event, boolean ignoreSender)
      Specified by:
      notify in interface org.keycloak.cluster.ClusterProvider
    • notify

      public void notify(String taskKey, Collection<? extends org.keycloak.cluster.ClusterEvent> events, boolean ignoreSender, org.keycloak.cluster.ClusterProvider.DCNotify dcNotify)
      Specified by:
      notify in interface org.keycloak.cluster.ClusterProvider
    • notify

      public void notify(String taskKey, Collection<? extends org.keycloak.cluster.ClusterEvent> events, boolean ignoreSender)
      Specified by:
      notify in interface org.keycloak.cluster.ClusterProvider
    • close

      public void close()
      Specified by:
      close in interface org.keycloak.provider.Provider