Class NestedGroupsCacheProvider

java.lang.Object
com.atlassian.crowd.manager.directory.nestedgroups.NestedGroupsCacheProvider

public class NestedGroupsCacheProvider extends Object
Cache provider for CachedMultipleGroupsProvider
  • Constructor Details

    • NestedGroupsCacheProvider

      public NestedGroupsCacheProvider(long expiryMs, int maxSize)
  • Method Details

    • getSubgroupsCache

      protected com.google.common.cache.Cache<String,String[]> getSubgroupsCache(long directoryId, boolean isChildrenQuery, GroupType type)
      Returns cache for a given set of parameters. The same cache instance will be returned for the same parameters, if subsequent calls do not exceed configured expiration time. Cache entries of the returned cache are expired after write with configured expiry time.
    • getGroupsCache

      protected com.google.common.cache.Cache<String,Group> getGroupsCache(long directoryId, GroupType type)
      Returns cache for a given set of parameters. The same cache instance will be returned for the same parameters, if subsequent calls do not exceed configured expiration time plus margin described below. Cache entries of the returned cache are expired after write with configured expiry time plus margin. Comparing to getSubgroupsCache(long, boolean, GroupType) expiration times are extended by GROUPS_CACHE_MARGIN_MS to make sure that values that are pointed at are not expired.
    • createFromSystemProperties

      public static Optional<NestedGroupsCacheProvider> createFromSystemProperties()
      Returns provider configured according to system properties or Optional.empty(), if not configured. Please note that the cache is experimental and that's why it's disabled by default.