public interface 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.
|
java.util.Optional<InternalGroup> get(AccountGroup.Id groupId)
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 lookupjava.util.Optional<InternalGroup> get(AccountGroup.NameKey name)
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 lookupjava.util.Optional<InternalGroup> get(AccountGroup.UUID groupUuid)
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 lookupvoid evict(AccountGroup.Id groupId)
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!
groupId
- the ID of a possibly associated groupvoid evict(AccountGroup.NameKey groupName)
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!
groupName
- the name of a possibly associated groupvoid evict(AccountGroup.UUID groupUuid)
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!
groupUuid
- the UUID of a possibly associated group