public class

DefaultGroupMembershipCache

extends Object
implements GroupMembershipCache
java.lang.Object
   ↳ com.atlassian.confluence.user.crowd.DefaultGroupMembershipCache

Summary

Public Constructors
DefaultGroupMembershipCache(CacheFactory cacheFactory, String cacheKey)
Public Methods
List<InternalDirectoryGroup> getGroupsForGroup(long directoryId, String groupName)
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(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.
void setGroupsForGroup(long directoryId, String groupName, Iterable<InternalDirectoryGroup> referencedGroups)
Caches the list of Group objects for each membership for the given group name in the specified directory.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.user.crowd.GroupMembershipCache

Public Constructors

public DefaultGroupMembershipCache (CacheFactory cacheFactory, String cacheKey)

Public Methods

public List<InternalDirectoryGroup> getGroupsForGroup (long directoryId, String groupName)

Returns the list of groups which are cached for the given group name in the specified directory. or null if there is no cached list.

public void removeAllDirectoryMemberships (long directoryId)

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.

public void removeAllGroupMemberships (Group group)

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.

public void removeGroupGroupMemberships (long directoryId, String groupName)

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.

public void setGroupsForGroup (long directoryId, String groupName, Iterable<InternalDirectoryGroup> referencedGroups)

Caches the list of Group objects for each membership for the given group name in the specified directory.