Interface DomainCacheManager

All Known Subinterfaces:
WatcherDomainCacheManager
All Known Implementing Classes:
AbstractDomainCacheManager, MpDomainCacheManager

public interface DomainCacheManager
  • Method Details

    • getProfiles

      Set<String> getProfiles()
      Returns profile code, that contains at least 1 domain object in head state. Order of profiles will be kept thanks to TreeSet implementation.
      Returns:
      set of profiles codes
    • getAllProfiles

      Set<String> getAllProfiles()
      Returns profile code, that contains at least 1 domain object in head or session state. Order of profiles will be kept thanks to TreeSet implementation.
      Returns:
      set of profiles codes
    • getByPath

      DomainObject getByPath(String profileCode, String path)
      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. use getSessionElementByPath(String, String, String)
      Parameters:
      profileCode - profile code to fetch its domain
      path - 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. use getSessionElementByPath(String, String, String, EffectiveVersionConfiguration)
      Parameters:
      profileCode - profile code to fetch its domain
      path - 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

      DomainObject getSessionElementByPath(String profileCode, String user, String path)
      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 domain
      user - user nickname to get specific session
      path - 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 domain
      user - user nickname to get specific session
      path - 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

      void invalidateTreeVersionCachesAfter(int invalidateValue, TemporalUnit unit)
      Invalidate domain tree from cache if it's build time exceeds provided combination of given invalidateValue and unit. If not provided, default DomainWatcherConfig.DEFAULT_LIFESPAN_IN_CACHE_VALUE and DomainWatcherConfig.DEFAULT_LIFESPAN_IN_CACHE_UNIT lifespan will be used.
      Parameters:
      invalidateValue - value of domain tree lifespan in cache
      unit - of lifespan
    • invalidateProfile

      void invalidateProfile(String profile)
      Invalidate entries associated with given profile.
    • isValid

      default boolean isValid(String profile, String user, Set<Integer> versionIds)