public class GroupCacheImpl extends java.lang.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) |
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() |
void |
onCreateGroup(AccountGroup group)
Notify the cache that a new group was constructed.
|
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 void evict(AccountGroup.UUID groupUuid, AccountGroup.Id groupId, AccountGroup.NameKey groupName) throws java.io.IOException
evict
in interface GroupCache
java.io.IOException
public void evictAfterRename(AccountGroup.NameKey oldName) throws java.io.IOException
evictAfterRename
in interface GroupCache
java.io.IOException
public 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 onCreateGroup(AccountGroup group) throws java.io.IOException
GroupCache
onCreateGroup
in interface GroupCache
java.io.IOException