Class BaseCacheInitializer
java.lang.Object
org.keycloak.models.sessions.infinispan.initializer.CacheInitializer
org.keycloak.models.sessions.infinispan.initializer.BaseCacheInitializer
- Direct Known Subclasses:
InfinispanCacheInitializer
- Author:
- Marek Posolda
-
Field Summary
Modifier and TypeFieldDescriptionprotected final KeycloakSessionFactory
protected final SessionLoader<SessionLoader.LoaderContext,
SessionLoader.WorkerContext, SessionLoader.WorkerResult> protected final String
protected final org.infinispan.Cache<String,
Serializable> -
Constructor Summary
ConstructorDescriptionBaseCacheInitializer
(KeycloakSessionFactory sessionFactory, org.infinispan.Cache<String, Serializable> workCache, SessionLoader<SessionLoader.LoaderContext, SessionLoader.WorkerContext, SessionLoader.WorkerResult> sessionLoader, String stateKeySuffix) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Returns an integer which captures current progress.protected InitializerState
protected boolean
protected boolean
protected void
saveStateToCache
(InitializerState state) Methods inherited from class org.keycloak.models.sessions.infinispan.initializer.CacheInitializer
getStalledTimeoutInSeconds, loadSessions, startLoading
-
Field Details
-
sessionFactory
-
workCache
-
sessionLoader
protected final SessionLoader<SessionLoader.LoaderContext,SessionLoader.WorkerContext, sessionLoaderSessionLoader.WorkerResult> -
stateKey
-
-
Constructor Details
-
BaseCacheInitializer
public BaseCacheInitializer(KeycloakSessionFactory sessionFactory, org.infinispan.Cache<String, Serializable> workCache, SessionLoader<SessionLoader.LoaderContext, SessionLoader.WorkerContext, SessionLoader.WorkerResult> sessionLoader, String stateKeySuffix)
-
-
Method Details
-
isFinished
protected boolean isFinished()- Specified by:
isFinished
in classCacheInitializer
-
isCoordinator
protected boolean isCoordinator()- Specified by:
isCoordinator
in classCacheInitializer
-
getProgressIndicator
protected int getProgressIndicator()Description copied from class:CacheInitializer
Returns an integer which captures current progress. If there is a progress in loading, this indicator must be different most of the time so that it does not hit 30-seconds limit.- Specified by:
getProgressIndicator
in classCacheInitializer
- Returns:
- See Also:
-
#stalledTimeoutInSeconds
-
getStateFromCache
-
saveStateToCache
-