com.atlassian.user.impl.cache
Class MembershipCache
java.lang.Object
com.atlassian.user.impl.cache.MembershipCache
public class MembershipCache
- extends Object
The membership check cache is a cache where the key is the String
returned by getMembershipKey(String, Group) for a given user
and group, and the value is a Boolean indicating whether the user
is a member of that group.
Both true and false membership checks are cached.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MembershipCache
public MembershipCache(com.atlassian.cache.CacheFactory cacheFactory,
String cacheName)
getMembershipKey
protected String getMembershipKey(String username,
Group group)
put
public void put(User user,
Group group,
boolean isMember)
get
public Boolean get(User user,
Group group)
- Returns:
Boolean.TRUE if the user is a member of the group,
Boolean.FALSE if the user is not a member of the group, or
null if the result is not in the cache.
remove
public void remove(User user,
Group group)
remove
public void remove(List usernames,
Group group)
- Remove all cached values for a list of users and an associated group.
Typically called to remove all membership information when a group is
removed.
- Parameters:
usernames - a List of username Strings.group - the group of which the users are members.
Copyright © 2005-2009 Atlassian Software Systems Pty Ltd. All Rights Reserved.