Package io.higson.runtime.core.domain
Interface DomainCacheManager
- All Known Subinterfaces:
WatcherDomainCacheManager
- All Known Implementing Classes:
AbstractDomainCacheManager,MpDomainCacheManager
public interface DomainCacheManager
-
Method Summary
Modifier and TypeMethodDescriptionReturns profile code, that contains at least 1 domain object in head or session state.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.Returns profile code, that contains at least 1 domain object in head state.getSessionElementByPath(String profileCode, String user, String path) Returns domain object from given domain's path.getSessionElementByPath(String profileCode, String user, String path, EffectiveVersionConfiguration configuration) Returns domain object from given domain's path.voidvoidinvalidateProfile(String profile) Invalidate entries associated with given profile.voidinvalidateTreeVersionCachesAfter(int invalidateValue, TemporalUnit unit) Invalidate domain tree from cache if it's build time exceeds provided combination of given invalidateValue and unit.default booleanbooleanChecks, whenever something was changed for any of existing profiles.
-
Method Details
-
getProfiles
Returns profile code, that contains at least 1 domain object in head state. Order of profiles will be kept thanks toTreeSetimplementation.- Returns:
- set of profiles codes
-
getAllProfiles
Returns profile code, that contains at least 1 domain object in head or session state. Order of profiles will be kept thanks toTreeSetimplementation.- Returns:
- set of profiles codes
-
getByPath
Returns 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. usegetSessionElementByPath(String, String, String)- 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
DomainObject getByPath(String profileCode, String path, EffectiveVersionConfiguration configuration) Returns 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. usegetSessionElementByPath(String, String, String, EffectiveVersionConfiguration)- 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:
-
getSessionElementByPath
Returns domain object from given domain's path. Domain is created from head elements + elements from user's session- 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
-
getSessionElementByPath
DomainObject getSessionElementByPath(String profileCode, String user, String path, EffectiveVersionConfiguration configuration) Returns domain object from given domain's path. Domain is created from head elements + elements from user's session- Parameters:
profileCode- profile code to fetch its domainuser- user nickname to get specific sessionpath- 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:
-
wasSomethingChange
boolean wasSomethingChange()Checks, whenever something was changed for any of existing profiles. If there are no profiles, this should return false. Otherwise there are checks for elements like regions, version, domain elements configuration or definition.- Returns:
- true if something was changed during last update, or false
-
invalidateAllCaches
void invalidateAllCaches() -
invalidateTreeVersionCachesAfter
Invalidate domain tree from cache if it's build time exceeds provided combination of given invalidateValue and unit. If not provided, defaultDomainWatcherConfig.DEFAULT_LIFESPAN_IN_CACHE_VALUEandDomainWatcherConfig.DEFAULT_LIFESPAN_IN_CACHE_UNITlifespan will be used.- Parameters:
invalidateValue- value of domain tree lifespan in cacheunit- of lifespan
-
invalidateProfile
Invalidate entries associated with given profile. -
isValid
-