Interface MapStorage<V extends AbstractEntity,​M>

  • Type Parameters:
    V - Type of the stored values that contains all the data stripped of session state. In other words, in the entities there are only IDs and mostly primitive types / String, never references to *Model instances. See the Abstract*Entity classes in this module.
    M - Type of the *Model corresponding to the stored value, e.g. UserModel. This is used for filtering via model fields in ModelCriteriaBuilder which is necessary to abstract from physical layout and thus to support no-downtime upgrade.
    All Known Subinterfaces:
    MapStorageWithAuth<V,​M>
    All Known Implementing Classes:
    ConcurrentHashMapStorage, EmptyMapStorage, HotRodMapStorage, SingleUseObjectConcurrentHashMapStorage, SingleUseObjectHotRodMapStorage

    public interface MapStorage<V extends AbstractEntity,​M>
    Implementation of this interface interacts with a persistence storage storing various entities, e.g. users, realms.
    Author:
    hmlnarik
    • Method Detail

      • createTransaction

        MapKeycloakTransaction<V,​M> createTransaction​(KeycloakSession session)
        Creates a MapKeycloakTransaction object that tracks a new transaction related to this storage. In case of JPA or similar, the transaction object might be supplied by the container (via JTA) or shared same across storages accessing the same database within the same session; in other cases (e.g. plain map) a separate transaction handler might be created per each storage.
        Returns:
        See description. Never returns null