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
protected final int
protected final String
protected final org.infinispan.Cache<String,
Serializable> -
Constructor Summary
ConstructorDescriptionBaseCacheInitializer
(KeycloakSessionFactory sessionFactory, org.infinispan.Cache<String, Serializable> workCache, SessionLoader sessionLoader, String stateKeySuffix, int sessionsPerSegment) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Returns an integer which captures current progress.protected InitializerState
org.infinispan.Cache<String,
Serializable> protected boolean
protected boolean
protected void
saveStateToCache
(InitializerState state) Methods inherited from class org.keycloak.models.sessions.infinispan.initializer.CacheInitializer
getStalledTimeoutInSeconds, initCache, loadSessions, startLoading
-
Field Details
-
sessionFactory
-
workCache
-
sessionLoader
-
sessionsPerSegment
protected final int sessionsPerSegment -
stateKey
-
-
Constructor Details
-
BaseCacheInitializer
public BaseCacheInitializer(KeycloakSessionFactory sessionFactory, org.infinispan.Cache<String, Serializable> workCache, SessionLoader sessionLoader, String stateKeySuffix, int sessionsPerSegment)
-
-
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
-
getWorkCache
-