org.keycloak.models.sessions.infinispan.changes.sessions

## Class CrossDCLastSessionRefreshListener

- java.lang.Object
- - org.keycloak.models.sessions.infinispan.changes.sessions.CrossDCLastSessionRefreshListener

- All Implemented Interfaces:
    ClusterListener

      public class CrossDCLastSessionRefreshListener
      extends Object
      implements ClusterListener

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `IGNORE_REMOTE_CACHE_UPDATE`
    `static org.jboss.logging.Logger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CrossDCLastSessionRefreshListener(KeycloakSession session, org.infinispan.Cache<String,SessionEntityWrapper<UserSessionEntity>> cache, boolean offline)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `eventReceived(ClusterEvent event)` Registered task to be executed on all cluster nodes once it's notified from cache.
    `protected boolean` | `shouldUpdateLocalCache(String key)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          public static final org.jboss.logging.Logger logger

    - #### IGNORE_REMOTE_CACHE_UPDATE

          public static final String IGNORE_REMOTE_CACHE_UPDATE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CrossDCLastSessionRefreshListener

          public CrossDCLastSessionRefreshListener(KeycloakSession session,
                                                   org.infinispan.Cache<String,SessionEntityWrapper<UserSessionEntity>> cache,
                                                   boolean offline)

  - ### Method Detail

    - #### eventReceived

          public void eventReceived(ClusterEvent event)

      Description copied from interface: `ClusterListener`
      Registered task to be executed on all cluster nodes once it's notified from cache.
      Specified by:
        `eventReceived` in interface `ClusterListener`
      Parameters:
        `event` - value of notification (Object added into the cache)

    - #### shouldUpdateLocalCache

          protected boolean shouldUpdateLocalCache(String key)

Copyright © 2020 JBoss by Red Hat. All rights reserved.