com.atlassian.user.impl.cache
Class GroupsForUserCache
java.lang.Object
com.atlassian.user.impl.cache.GroupsForUserCache
- public class GroupsForUserCache
- extends java.lang.Object
The groups-for-user cache is a cache where the key is the username as a
String and the value is a List of group names as
Strings.
- See Also:
CachingGroupManager
|
Constructor Summary |
GroupsForUserCache(com.atlassian.cache.CacheFactory cacheFactory,
java.lang.String cacheName)
|
|
Method Summary |
java.util.List |
get(User user)
|
void |
put(User user,
java.util.List groupNames)
|
void |
remove(java.util.List usernames)
Remove a list of users from the cache by username. |
void |
remove(User user)
Remove the cached list of groups for a particular user from
the cache. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupsForUserCache
public GroupsForUserCache(com.atlassian.cache.CacheFactory cacheFactory,
java.lang.String cacheName)
put
public void put(User user,
java.util.List groupNames)
get
public java.util.List get(User user)
remove
public void remove(User user)
- Remove the cached list of groups for a particular user from
the cache. Typically used when the membership of a user has
been updated, so the cached list of groups is out of date.
It's not very efficient to iterate over the list and
remove the affected groups, so we just ditch the entire
cached list.
remove
public void remove(java.util.List usernames)
- Remove a list of users from the cache by username. Typically
used when a group has been removed, and all its members need
to have their cached groups cleared.
Copyright © 2005-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.