Package com.google.gerrit.server.account
Class GroupIncludeCacheImpl
- java.lang.Object
-
- com.google.gerrit.server.account.GroupIncludeCacheImpl
-
- All Implemented Interfaces:
GroupIncludeCache
public class GroupIncludeCacheImpl extends Object implements GroupIncludeCache
Tracks group inclusions in memory for efficient access.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GroupIncludeCacheImpl.ExternalGroupsSerializer
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<AccountGroup.UUID>
allExternalMembers()
Returns set of any UUIDs that are not internal groups.void
evictGroupsWithMember(Account.Id memberId)
void
evictParentGroupsOf(AccountGroup.UUID groupId)
Collection<AccountGroup.UUID>
getGroupsWithMember(Account.Id memberId)
Returns the UUIDs of all groups of which the specified account is a direct member.static com.google.inject.Module
module()
Collection<AccountGroup.UUID>
parentGroupsOf(AccountGroup.UUID groupId)
Returns the parent groups of a subgroup.
-
-
-
Method Detail
-
module
public static com.google.inject.Module module()
-
getGroupsWithMember
public Collection<AccountGroup.UUID> getGroupsWithMember(Account.Id memberId)
Description copied from interface:GroupIncludeCache
Returns the UUIDs of all groups of which the specified account is a direct member.- Specified by:
getGroupsWithMember
in interfaceGroupIncludeCache
- Parameters:
memberId
- the ID of the account- Returns:
- the UUIDs of all groups having the account as member
-
parentGroupsOf
public Collection<AccountGroup.UUID> parentGroupsOf(AccountGroup.UUID groupId)
Description copied from interface:GroupIncludeCache
Returns the parent groups of a subgroup.- Specified by:
parentGroupsOf
in interfaceGroupIncludeCache
- Parameters:
groupId
- the UUID of the subgroup- Returns:
- the UUIDs of all direct parent groups
-
evictGroupsWithMember
public void evictGroupsWithMember(Account.Id memberId)
- Specified by:
evictGroupsWithMember
in interfaceGroupIncludeCache
-
evictParentGroupsOf
public void evictParentGroupsOf(AccountGroup.UUID groupId)
- Specified by:
evictParentGroupsOf
in interfaceGroupIncludeCache
-
allExternalMembers
public Collection<AccountGroup.UUID> allExternalMembers()
Description copied from interface:GroupIncludeCache
Returns set of any UUIDs that are not internal groups.- Specified by:
allExternalMembers
in interfaceGroupIncludeCache
-
-