Class InfinispanCacheInitializer
- java.lang.Object
-
- org.keycloak.models.sessions.infinispan.initializer.CacheInitializer
-
- org.keycloak.models.sessions.infinispan.initializer.BaseCacheInitializer
-
- org.keycloak.models.sessions.infinispan.initializer.InfinispanCacheInitializer
-
public class InfinispanCacheInitializer extends BaseCacheInitializer
Startup initialization for reading persistent userSessions to be filled into infinispan/memory . In cluster, the initialization is distributed among all cluster nodes, so the startup time is even faster Implementation is pretty generic and doesn't contain any "userSession" specific stuff. All logic related to how are sessions loaded is in the SessionLoader implementation- Author:
- Marek Posolda
-
-
Field Summary
-
Fields inherited from class org.keycloak.models.sessions.infinispan.initializer.BaseCacheInitializer
sessionFactory, sessionLoader, sessionsPerSegment, stateKey, workCache
-
-
Constructor Summary
Constructors Constructor Description InfinispanCacheInitializer(KeycloakSessionFactory sessionFactory, org.infinispan.Cache<String,Serializable> workCache, SessionLoader sessionLoader, String stateKeySuffix, int sessionsPerSegment, int maxErrors, int stalledTimeoutInSeconds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getStalledTimeoutInSeconds()
void
initCache()
protected void
startLoading()
Just coordinator will run thisprotected void
startLoadingImpl(InitializerState state, SessionLoader.LoaderContext loaderCtx)
-
Methods inherited from class org.keycloak.models.sessions.infinispan.initializer.BaseCacheInitializer
getProgressIndicator, getStateFromCache, getWorkCache, isCoordinator, isFinished, saveStateToCache
-
Methods inherited from class org.keycloak.models.sessions.infinispan.initializer.CacheInitializer
loadSessions
-
-
-
-
Constructor Detail
-
InfinispanCacheInitializer
public InfinispanCacheInitializer(KeycloakSessionFactory sessionFactory, org.infinispan.Cache<String,Serializable> workCache, SessionLoader sessionLoader, String stateKeySuffix, int sessionsPerSegment, int maxErrors, int stalledTimeoutInSeconds)
-
-
Method Detail
-
initCache
public void initCache()
- Overrides:
initCache
in classCacheInitializer
-
startLoading
protected void startLoading()
Description copied from class:CacheInitializer
Just coordinator will run this- Specified by:
startLoading
in classCacheInitializer
-
getStalledTimeoutInSeconds
protected int getStalledTimeoutInSeconds()
- Specified by:
getStalledTimeoutInSeconds
in classCacheInitializer
-
startLoadingImpl
protected void startLoadingImpl(InitializerState state, SessionLoader.LoaderContext loaderCtx)
-
-