com.atlassian.confluence.user.crowd
Interface GroupMembershipCache

All Known Implementing Classes:
DefaultGroupMembershipCache

public interface GroupMembershipCache

A direction agnostic cache of maps from directory ids and group names to groups. Can be used for caching the list of members of a group, or the list of groups that a group is a member of.


Method Summary
 java.util.List<com.atlassian.crowd.model.group.InternalDirectoryGroup> getGroupsForGroup(long directoryId, java.lang.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(com.atlassian.crowd.model.group.Group group)
          Removes any entries in the cache which contain the group in its directory.
 void removeGroupGroupMemberships(long directoryId, java.lang.String groupName)
          Removes any list of groups which are cached for the named group in the specified directory.
 void setGroupsForGroup(long directoryId, java.lang.String group, java.lang.Iterable<com.atlassian.crowd.model.group.InternalDirectoryGroup> parentGroups)
          Caches the list of Group objects for each membership for the given group name in the specified directory.
 

Method Detail

setGroupsForGroup

void setGroupsForGroup(long directoryId,
                       java.lang.String group,
                       java.lang.Iterable<com.atlassian.crowd.model.group.InternalDirectoryGroup> parentGroups)
Caches the list of Group objects for each membership for the given group name in the specified directory.


getGroupsForGroup

java.util.List<com.atlassian.crowd.model.group.InternalDirectoryGroup> getGroupsForGroup(long directoryId,
                                                                                         java.lang.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.


removeGroupGroupMemberships

void removeGroupGroupMemberships(long directoryId,
                                 java.lang.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.


removeAllGroupMemberships

void removeAllGroupMemberships(com.atlassian.crowd.model.group.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.


removeAllDirectoryMemberships

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.



Copyright © 2003-2014 Atlassian. All Rights Reserved.