Class DefaultGroupMembershipCache
- java.lang.Object
-
- com.atlassian.confluence.impl.user.crowd.DefaultGroupMembershipCache
-
- All Implemented Interfaces:
GroupMembershipCache
public class DefaultGroupMembershipCache extends Object implements GroupMembershipCache
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GroupMembershipCachecreateChildGroupMembershipCache(TransactionAwareCacheFactory cacheFactory)static GroupMembershipCachecreateParentGroupMembershipCache(TransactionAwareCacheFactory cacheFactory)List<com.atlassian.crowd.model.group.InternalDirectoryGroup>getGroupsForGroup(long directoryId, String groupName)Returns the list of groups which are cached for the given group name in the specified directory.List<com.atlassian.crowd.model.group.InternalDirectoryGroup>getGroupsForGroup(long directoryId, String groupName, Supplier<List<com.atlassian.crowd.model.group.InternalDirectoryGroup>> groupLoader)Returns the list of groups which are cached for the given group name in the specified directory.voidremoveAllDirectoryMemberships(long directoryId)Removes any entries in the cache which relate to the specified directory.voidremoveAllGroupMemberships(com.atlassian.crowd.model.group.Group group)Removes any entries in the cache which contain the group in its directory.voidremoveGroupGroupMemberships(long directoryId, String groupName)Removes any list of groups which are cached for the named group in the specified directory.
-
-
-
Method Detail
-
createParentGroupMembershipCache
public static GroupMembershipCache createParentGroupMembershipCache(TransactionAwareCacheFactory cacheFactory)
- Since:
- 7.5
-
createChildGroupMembershipCache
public static GroupMembershipCache createChildGroupMembershipCache(TransactionAwareCacheFactory cacheFactory)
- Since:
- 7.5
-
getGroupsForGroup
public List<com.atlassian.crowd.model.group.InternalDirectoryGroup> getGroupsForGroup(long directoryId, String groupName)
Description copied from interface:GroupMembershipCacheReturns the list of groups which are cached for the given group name in the specified directory. ornullif there is no cached list.- Specified by:
getGroupsForGroupin interfaceGroupMembershipCache
-
getGroupsForGroup
public List<com.atlassian.crowd.model.group.InternalDirectoryGroup> getGroupsForGroup(long directoryId, String groupName, Supplier<List<com.atlassian.crowd.model.group.InternalDirectoryGroup>> groupLoader)
Description copied from interface:GroupMembershipCacheReturns the list of groups which are cached for the given group name in the specified directory. If not in the cache, the given spplier will be called to provide a new list.- Specified by:
getGroupsForGroupin interfaceGroupMembershipCache
-
removeGroupGroupMemberships
public void removeGroupGroupMemberships(long directoryId, String groupName)Description copied from interface:GroupMembershipCacheRemoves any list of groups which are cached for the named group in the specified directory. Does nothing if there is no corresponding entry in the cache.- Specified by:
removeGroupGroupMembershipsin interfaceGroupMembershipCache
-
removeAllGroupMemberships
public void removeAllGroupMemberships(com.atlassian.crowd.model.group.Group group)
Description copied from interface:GroupMembershipCacheRemoves any entries in the cache which contain the group in its directory.This can be a slow operation if the cache is large. This is a trade-off of the cache design, which is optimised for fast retrieval of the list of groups cached for a group.
Removes any GROUPS_FOR_GROUP entry in this cache for the passed in group.
- Specified by:
removeAllGroupMembershipsin interfaceGroupMembershipCache
-
removeAllDirectoryMemberships
public void removeAllDirectoryMemberships(long directoryId)
Description copied from interface:GroupMembershipCacheRemoves any entries in the cache which relate to the specified directory.This can be a slow operation if the cache is large. This is a trade-off of the cache design, which is optimised for fast retrieval of the list of groups cached for a group.
- Specified by:
removeAllDirectoryMembershipsin interfaceGroupMembershipCache
-
-