org.keycloak.models.sessions.infinispan.initializer

## Class BaseCacheInitializer

- java.lang.Object
- - org.keycloak.models.sessions.infinispan.initializer.CacheInitializer
  - - org.keycloak.models.sessions.infinispan.initializer.BaseCacheInitializer

- Direct Known Subclasses:
    InfinispanCacheInitializer

      public abstract class BaseCacheInitializer
      extends CacheInitializer

  Author:
    Marek Posolda

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected KeycloakSessionFactory` | `sessionFactory`
    `protected SessionLoader` | `sessionLoader`
    `protected int` | `sessionsPerSegment`
    `protected String` | `stateKey`
    `protected org.infinispan.Cache<String,Serializable>` | `workCache`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseCacheInitializer(KeycloakSessionFactory sessionFactory, org.infinispan.Cache<String,Serializable> workCache, SessionLoader sessionLoader, String stateKeySuffix, int sessionsPerSegment)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected InitializerState` | `getStateFromCache()`
    `org.infinispan.Cache<String,Serializable>` | `getWorkCache()`
    `protected boolean` | `isCoordinator()`
    `protected boolean` | `isFinished()`
    `protected void` | `saveStateToCache(InitializerState state)`

    - ### Methods inherited from class org.keycloak.models.sessions.infinispan.initializer.CacheInitializer

      `initCache, loadSessions, startLoading`

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

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

- - ### Field Detail

    - #### sessionFactory

          protected final KeycloakSessionFactory sessionFactory

    - #### workCache

          protected final org.infinispan.Cache<String,Serializable> workCache

    - #### sessionLoader

          protected final SessionLoader sessionLoader

    - #### sessionsPerSegment

          protected final int sessionsPerSegment

    - #### stateKey

          protected final String stateKey

  - ### Constructor Detail

    - #### BaseCacheInitializer

          public BaseCacheInitializer(KeycloakSessionFactory sessionFactory,
                                      org.infinispan.Cache<String,Serializable> workCache,
                                      SessionLoader sessionLoader,
                                      String stateKeySuffix,
                                      int sessionsPerSegment)

  - ### Method Detail

    - #### isFinished

          protected boolean isFinished()

      Specified by:
        `isFinished` in class `CacheInitializer`

    - #### isCoordinator

          protected boolean isCoordinator()

      Specified by:
        `isCoordinator` in class `CacheInitializer`

    - #### getStateFromCache

          protected InitializerState getStateFromCache()

    - #### saveStateToCache

          protected void saveStateToCache(InitializerState state)

    - #### getWorkCache

          public org.infinispan.Cache<String,Serializable> getWorkCache()

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