Package com.google.gerrit.server.account
Interface GroupCache
-
- All Known Implementing Classes:
GroupCacheImpl
public interface GroupCache
Tracks group objects in memory for efficient access.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
evict(AccountGroup.Id groupId)
Removes the association of the given ID with a group.void
evict(AccountGroup.NameKey groupName)
Removes the association of the given name with a group.void
evict(AccountGroup.UUID groupUuid)
Removes the association of the given UUID with a group.Optional<InternalGroup>
get(AccountGroup.Id groupId)
Looks up an internal group by its ID.Optional<InternalGroup>
get(AccountGroup.NameKey name)
Looks up an internal group by its name.Optional<InternalGroup>
get(AccountGroup.UUID groupUuid)
Looks up an internal group by its UUID.
-
-
-
Method Detail
-
get
Optional<InternalGroup> get(AccountGroup.Id groupId)
Looks up an internal group by its ID.- Parameters:
groupId
- the ID of the internal group- Returns:
- an
Optional
of the internal group, or an emptyOptional
if no internal group with this ID exists on this server or an error occurred during lookup
-
get
Optional<InternalGroup> get(AccountGroup.NameKey name)
Looks up an internal group by its name.- Parameters:
name
- the name of the internal group- Returns:
- an
Optional
of the internal group, or an emptyOptional
if no internal group with this name exists on this server or an error occurred during lookup
-
get
Optional<InternalGroup> get(AccountGroup.UUID groupUuid)
Looks up an internal group by its UUID.- Parameters:
groupUuid
- the UUID of the internal group- Returns:
- an
Optional
of the internal group, or an emptyOptional
if no internal group with this UUID exists on this server or an error occurred during lookup
-
evict
void evict(AccountGroup.Id groupId)
Removes the association of the given ID with a group.The next call to
get(AccountGroup.Id)
won't provide a cached value.It's safe to call this method if no association exists.
Note: This method doesn't touch any associations between names/UUIDs and groups!
- Parameters:
groupId
- the ID of a possibly associated group
-
evict
void evict(AccountGroup.NameKey groupName)
Removes the association of the given name with a group.The next call to
get(AccountGroup.NameKey)
won't provide a cached value.It's safe to call this method if no association exists.
Note: This method doesn't touch any associations between IDs/UUIDs and groups!
- Parameters:
groupName
- the name of a possibly associated group
-
evict
void evict(AccountGroup.UUID groupUuid)
Removes the association of the given UUID with a group.The next call to
get(AccountGroup.UUID)
won't provide a cached value.It's safe to call this method if no association exists.
Note: This method doesn't touch any associations between names/IDs and groups!
- Parameters:
groupUuid
- the UUID of a possibly associated group
-
-