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

## Class CrossDCLastSessionRefreshStore

- java.lang.Object
- - org.keycloak.models.sessions.infinispan.changes.sessions.AbstractLastSessionRefreshStore
  - - org.keycloak.models.sessions.infinispan.changes.sessions.CrossDCLastSessionRefreshStore

-     public class CrossDCLastSessionRefreshStore
      extends AbstractLastSessionRefreshStore

  Cross-DC based CrossDCLastSessionRefreshStore Tracks the queue of lastSessionRefreshes, which were updated on this host. Those will be sent to the second DC in bulk, so second DC can update lastSessionRefreshes on it's side. Message is sent either periodically or if there are lots of stored lastSessionRefreshes.
  Author:
    Marek Posolda

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CrossDCLastSessionRefreshStore(int maxIntervalBetweenMessagesSeconds, int maxCount, String eventKey)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `sendMessage(KeycloakSession kcSession, Map<String,SessionData> refreshesToSend)` Bulk update the underlying store with all the user sessions, which were refreshed by Keycloak since the last call of this method

    - ### Methods inherited from class org.keycloak.models.sessions.infinispan.changes.sessions.AbstractLastSessionRefreshStore

      `putLastSessionRefresh, reset`

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

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

- - ### Field Detail

    - #### logger

          protected static final org.jboss.logging.Logger logger

  - ### Constructor Detail

    - #### CrossDCLastSessionRefreshStore

          protected CrossDCLastSessionRefreshStore(int maxIntervalBetweenMessagesSeconds,
                                                   int maxCount,
                                                   String eventKey)

  - ### Method Detail

    - #### sendMessage

          protected void sendMessage(KeycloakSession kcSession,
                                     Map<String,SessionData> refreshesToSend)

      Description copied from class: `AbstractLastSessionRefreshStore`
      Bulk update the underlying store with all the user sessions, which were refreshed by Keycloak since the last call of this method
      Specified by:
        `sendMessage` in class `AbstractLastSessionRefreshStore`
        `refreshesToSend` - Key is userSession ID, SessionData are data about the session

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