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 GroupMembershipCache
createChildGroupMembershipCache(TransactionAwareCacheFactory cacheFactory)
static GroupMembershipCache
createParentGroupMembershipCache(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.void
removeAllDirectoryMemberships(long directoryId)
Removes any entries in the cache which relate to the specified directory.void
removeAllGroupMemberships(com.atlassian.crowd.model.group.Group group)
Removes any entries in the cache which contain the group in its directory.void
removeGroupGroupMemberships(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:GroupMembershipCache
Returns the list of groups which are cached for the given group name in the specified directory. ornull
if there is no cached list.- Specified by:
getGroupsForGroup
in 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:GroupMembershipCache
Returns 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:
getGroupsForGroup
in interfaceGroupMembershipCache
-
removeGroupGroupMemberships
public void removeGroupGroupMemberships(long directoryId, String groupName)
Description copied from interface:GroupMembershipCache
Removes 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:
removeGroupGroupMemberships
in interfaceGroupMembershipCache
-
removeAllGroupMemberships
public void removeAllGroupMemberships(com.atlassian.crowd.model.group.Group group)
Description copied from interface:GroupMembershipCache
Removes 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:
removeAllGroupMemberships
in interfaceGroupMembershipCache
-
removeAllDirectoryMemberships
public void removeAllDirectoryMemberships(long directoryId)
Description copied from interface:GroupMembershipCache
Removes 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:
removeAllDirectoryMemberships
in interfaceGroupMembershipCache
-
-