Package io.higson.runtime.core.domain
Class AbstractDomainCacheManager
java.lang.Object
io.higson.runtime.core.domain.AbstractDomainCacheManager
- All Implemented Interfaces:
DomainCacheManager
- Direct Known Subclasses:
MpDomainCacheManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MpDomainCacheProviderprotected Map<String,TreeDomain> protected final MpDomainRefreshControllerprotected Map<CacheKey,TreeDomain> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDomainCacheManager(MpDomainCacheProvider cacheProvider, MpDomainRefreshController refreshController) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsProfileCode(String profileCode, CacheKey entryKey) Set of profiles (head + session), which have at least one domain element.Returns domain object from given domain's path in head state.getByPath(String profileCode, String path, EffectiveVersionConfiguration configuration) Returns domain object from given domain's path.Set of profiles (only HEAD), which have at least one domain element.getSessionElementByPath(String profileCode, String user, String path) Returns domain object from given domain's path.voidprotected voidrefreshHeads(String profileCode) protected abstract voidrefreshHeads(String profileCode, EffectiveVersionConfiguration configuration) protected voidrefreshSessionsOfProfileAndUser(String profileCode, String user, EffectiveVersionConfiguration configuration) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.higson.runtime.core.domain.DomainCacheManager
getSessionElementByPath, invalidateProfile, invalidateTreeVersionCachesAfter, isValid, wasSomethingChange
-
Field Details
-
refreshController
-
cacheProvider
-
headElementsByProfiles
-
sessionElementsByCacheKey
-
-
Constructor Details
-
AbstractDomainCacheManager
public AbstractDomainCacheManager(MpDomainCacheProvider cacheProvider, MpDomainRefreshController refreshController)
-
-
Method Details
-
refreshHeads
protected abstract void refreshHeads(String profileCode, EffectiveVersionConfiguration configuration) -
getProfiles
Set of profiles (only HEAD), which have at least one domain element.- Specified by:
getProfilesin interfaceDomainCacheManager- Returns:
- set of profiles codes
-
getAllProfiles
Set of profiles (head + session), which have at least one domain element.- Specified by:
getAllProfilesin interfaceDomainCacheManager- Returns:
- set of profiles codes
-
getByPath
Description copied from interface:DomainCacheManagerReturns domain object from given domain's path in head state. Uses system active versions to resolve domain tree. Domain is created only from head elements, session changes are not visible. If you want to get domain element with session changes. useDomainCacheManager.getSessionElementByPath(String, String, String)- Specified by:
getByPathin interfaceDomainCacheManager- Parameters:
profileCode- profile code to fetch its domainpath- domain's path, i.e./PLANS[LIAB]/OPTIONS[OPT1]- Returns:
- found domain object or null, if object does not exist
-
getByPath
public DomainObject getByPath(String profileCode, String path, EffectiveVersionConfiguration configuration) Description copied from interface:DomainCacheManagerReturns domain object from given domain's path. Domain is created only from head elements, session changes are not visible. If you want to get domain element with session changes. useDomainCacheManager.getSessionElementByPath(String, String, String, EffectiveVersionConfiguration)- Specified by:
getByPathin interfaceDomainCacheManager- Parameters:
profileCode- profile code to fetch its domainpath- domain's path, i.e./PLANS[LIAB]/OPTIONS[OPT1]configuration- configuration to override specific version or date. Active system versions will be used if not present- Returns:
- found domain object or null, if object does not exist
- See Also:
-
refreshSessionsOfProfileAndUser
protected void refreshSessionsOfProfileAndUser(String profileCode, String user, EffectiveVersionConfiguration configuration) -
containsProfileCode
-
refreshHeads
-
getSessionElementByPath
Description copied from interface:DomainCacheManagerReturns domain object from given domain's path. Domain is created from head elements + elements from user's session- Specified by:
getSessionElementByPathin interfaceDomainCacheManager- Parameters:
profileCode- profile code to fetch its domainuser- user nickname to get specific sessionpath- domain's path, i.e./PLANS[LIAB]/OPTIONS[OPT1]- Returns:
- found domain object or null, if object does not exist
-
invalidateAllCaches
public void invalidateAllCaches()- Specified by:
invalidateAllCachesin interfaceDomainCacheManager
-