Package org.openiam.cache
Class AbstractCacheSweeper
- java.lang.Object
-
- org.openiam.cache.AbstractRedisCacheProvider
-
- org.openiam.cache.AbstractCacheSweeper
-
- All Implemented Interfaces:
Sweepable
- Direct Known Subclasses:
AbstractBackendSweeper
public abstract class AbstractCacheSweeper extends AbstractRedisCacheProvider implements Sweepable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractCacheSweeper.CacheMode
-
Nested classes/interfaces inherited from class org.openiam.cache.AbstractRedisCacheProvider
AbstractRedisCacheProvider.CacheType, AbstractRedisCacheProvider.Context
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Log
log
protected org.redisson.api.RedissonClient
redissonClient
-
Constructor Summary
Constructors Constructor Description AbstractCacheSweeper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected <T extends BaseIdentity>
voidevictOldKeys(Collection<T> collectionFromDatabase, String key, org.springframework.data.redis.core.RedisTemplate<String,?> redisTemplate, Function<T,String> keyExtractor)
abstract void
forceSweep()
protected AbstractCacheSweeper.CacheMode
getCacheMode()
protected String
getDateCacheKey()
protected String
getLockCacheKey()
protected abstract int
getSweepTime()
void
sweep()
Placeholder for Spring to call via Quartz.-
Methods inherited from class org.openiam.cache.AbstractRedisCacheProvider
buildCacheKey, buildCacheKey, getCacheType, getContext
-
-
-
-
Method Detail
-
getCacheMode
protected AbstractCacheSweeper.CacheMode getCacheMode()
-
getDateCacheKey
protected final String getDateCacheKey()
-
getLockCacheKey
protected final String getLockCacheKey()
-
getSweepTime
protected abstract int getSweepTime()
-
forceSweep
public abstract void forceSweep()
-
sweep
public void sweep()
Description copied from interface:Sweepable
Placeholder for Spring to call via Quartz. Required for @Transactional sweeper methods.
-
evictOldKeys
protected <T extends BaseIdentity> void evictOldKeys(Collection<T> collectionFromDatabase, String key, org.springframework.data.redis.core.RedisTemplate<String,?> redisTemplate, Function<T,String> keyExtractor)
-
-