public class GroupCacheImpl extends Object implements GroupCache
Modifier and Type | Method and Description |
---|---|
void |
evict(AccountGroup.UUID groupUuid,
AccountGroup.Id groupId,
AccountGroup.NameKey groupName) |
void |
evictAfterRename(AccountGroup.NameKey oldName) |
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.
|
static com.google.inject.Module |
module() |
void |
onCreateGroup(AccountGroup group)
Notify the cache that a new group was constructed.
|
public static com.google.inject.Module module()
public 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 void evict(AccountGroup.UUID groupUuid, AccountGroup.Id groupId, AccountGroup.NameKey groupName) throws IOException
evict
in interface GroupCache
IOException
public void evictAfterRename(AccountGroup.NameKey oldName) throws IOException
evictAfterRename
in interface GroupCache
IOException
public 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 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 onCreateGroup(AccountGroup group) throws IOException
GroupCache
onCreateGroup
in interface GroupCache
IOException