Class DefaultGroupMembershipCache

    • Method Detail

      • 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. or null if there is no cached list.
        Specified by:
        getGroupsForGroup in interface GroupMembershipCache
      • 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 interface GroupMembershipCache
      • 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 interface GroupMembershipCache
      • 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 interface GroupMembershipCache
      • 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 interface GroupMembershipCache