public class GroupCacheImpl extends java.lang.Object implements GroupCache
Modifier and Type | Method and 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.
|
java.util.Optional<InternalGroup> |
get(AccountGroup.Id groupId)
Looks up an internal group by its ID.
|
java.util.Optional<InternalGroup> |
get(AccountGroup.NameKey name)
Looks up an internal group by its name.
|
java.util.Optional<InternalGroup> |
get(AccountGroup.UUID groupUuid)
Looks up an internal group by its UUID.
|
static com.google.inject.Module |
module() |
public static com.google.inject.Module module()
public java.util.Optional<InternalGroup> get(AccountGroup.Id groupId)
GroupCache
get
in interface GroupCache
groupId
- the ID of the internal groupOptional
of the internal group, or an empty Optional
if no internal
group with this ID exists on this server or an error occurred during lookuppublic java.util.Optional<InternalGroup> get(AccountGroup.NameKey name)
GroupCache
get
in interface GroupCache
name
- the name of the internal groupOptional
of the internal group, or an empty Optional
if no internal
group with this name exists on this server or an error occurred during lookuppublic java.util.Optional<InternalGroup> get(AccountGroup.UUID groupUuid)
GroupCache
get
in interface GroupCache
groupUuid
- the UUID of the internal groupOptional
of the internal group, or an empty Optional
if no internal
group with this UUID exists on this server or an error occurred during lookuppublic void evict(AccountGroup.Id groupId)
GroupCache
The next call to GroupCache.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!
evict
in interface GroupCache
groupId
- the ID of a possibly associated grouppublic void evict(AccountGroup.NameKey groupName)
GroupCache
The next call to GroupCache.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!
evict
in interface GroupCache
groupName
- the name of a possibly associated grouppublic void evict(AccountGroup.UUID groupUuid)
GroupCache
The next call to GroupCache.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!
evict
in interface GroupCache
groupUuid
- the UUID of a possibly associated group