public abstract class BaseUserCache extends Object implements UserCache
TODO: This could probably be made more efficient with bulk getting. The Google cache impl allows this: override loadAll and use getAll() to fetch multiple entities.
UserCache.CachedUser| Modifier and Type | Field and Description |
|---|---|
protected FlowableCommonAppProperties |
properties |
protected com.google.common.cache.LoadingCache<String,UserCache.CachedUser> |
userCache |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseUserCache(FlowableCommonAppProperties properties) |
| Modifier and Type | Method and Description |
|---|---|
UserCache.CachedUser |
getUser(String userId) |
UserCache.CachedUser |
getUser(String userId,
boolean throwExceptionOnNotFound,
boolean throwExceptionOnInactive,
boolean checkValidity) |
protected void |
initCache() |
void |
invalidate(String userId) |
protected abstract UserCache.CachedUser |
loadUser(String userId) |
void |
putUser(String userId,
UserCache.CachedUser cachedUser) |
protected final FlowableCommonAppProperties properties
protected com.google.common.cache.LoadingCache<String,UserCache.CachedUser> userCache
protected BaseUserCache(FlowableCommonAppProperties properties)
@PostConstruct protected void initCache()
protected abstract UserCache.CachedUser loadUser(String userId)
public void putUser(String userId, UserCache.CachedUser cachedUser)
public UserCache.CachedUser getUser(String userId)
public UserCache.CachedUser getUser(String userId, boolean throwExceptionOnNotFound, boolean throwExceptionOnInactive, boolean checkValidity)
public void invalidate(String userId)
invalidate in interface UserCacheCopyright © 2022 Flowable. All rights reserved.