Package org.openiam.authmanager.cache
Class EntitltementsObjectCache
- java.lang.Object
-
- org.openiam.cache.AbstractRedisCacheProvider
-
- org.openiam.common.beans.cache.AbstractBackendRedisCache
-
- org.openiam.authmanager.cache.EntitltementsObjectCache
-
- All Implemented Interfaces:
Sweepable
@Component @DependsOn("entitltementsObjectCacheSweeper") public class EntitltementsObjectCache extends AbstractBackendRedisCache implements Sweepable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openiam.cache.AbstractRedisCacheProvider
AbstractRedisCacheProvider.CacheType, AbstractRedisCacheProvider.Context
-
-
Field Summary
-
Fields inherited from class org.openiam.cache.AbstractRedisCacheProvider
log
-
-
Constructor Summary
Constructors Constructor Description EntitltementsObjectCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCacheEntry(AbstractAuthorizationEntity entity)AbstractAuthorizationEntitygetCachedEntitlementObjectByGraphId(String graphId)Finds cached entitlements objects by graph IDS This avoids going to either Gremlin or the databaseprotected AbstractRedisCacheProvider.CacheTypegetCacheType()Set<ResourceAuthorizationRight>getResourceAuthorizationRights()voidinit()booleanisResourcePublic(String id)voidrefreshResource(AbstractAuthorizationEntity entity)voidsweep()OE-3022 - periodically sweeps the cache to ensure that the cache is up to date even if fanout messages are not reaching the destination-
Methods inherited from class org.openiam.common.beans.cache.AbstractBackendRedisCache
getContext
-
Methods inherited from class org.openiam.cache.AbstractRedisCacheProvider
buildCacheKey, buildCacheKey
-
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
sweep
@Scheduled(fixedRateString="${org.openiam.graph.locale.cache.sweep.time}", initialDelay=0L) public void sweep()OE-3022 - periodically sweeps the cache to ensure that the cache is up to date even if fanout messages are not reaching the destination
-
addCacheEntry
public void addCacheEntry(AbstractAuthorizationEntity entity)
-
refreshResource
public void refreshResource(AbstractAuthorizationEntity entity)
-
getCachedEntitlementObjectByGraphId
public AbstractAuthorizationEntity getCachedEntitlementObjectByGraphId(String graphId)
Finds cached entitlements objects by graph IDS This avoids going to either Gremlin or the database- Parameters:
graphIds- - the graph IDs to query by- Returns:
-
getCacheType
protected AbstractRedisCacheProvider.CacheType getCacheType()
- Specified by:
getCacheTypein classAbstractRedisCacheProvider
-
getResourceAuthorizationRights
public Set<ResourceAuthorizationRight> getResourceAuthorizationRights()
-
isResourcePublic
public boolean isResourcePublic(String id)
-
-