Package alluxio.security.group
Class CachedGroupMapping
- java.lang.Object
-
- alluxio.security.group.CachedGroupMapping
-
- All Implemented Interfaces:
GroupMappingService
public class CachedGroupMapping extends java.lang.Object implements GroupMappingService
Class to map user to groups. It maintains a cache for user to groups mapping. The underlying implementation depends onGroupMappingService
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface alluxio.security.group.GroupMappingService
GroupMappingService.Factory
-
-
Constructor Summary
Constructors Constructor Description CachedGroupMapping(GroupMappingService service, long groupMappingCacheTimeoutMs)
Constructor with specifiedGroupMappingService
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getGroups(java.lang.String user)
Gets all various group memberships of a given user.
-
-
-
Constructor Detail
-
CachedGroupMapping
public CachedGroupMapping(GroupMappingService service, long groupMappingCacheTimeoutMs)
Constructor with specifiedGroupMappingService
. Initializes the cache if enabled.- Parameters:
service
- group mapping servicegroupMappingCacheTimeoutMs
- The timeout in millseconds before we should reload the cache
-
-
Method Detail
-
getGroups
public java.util.List<java.lang.String> getGroups(java.lang.String user) throws java.io.IOException
Description copied from interface:GroupMappingService
Gets all various group memberships of a given user. Returns EMPTY list in case of non-existing user.- Specified by:
getGroups
in interfaceGroupMappingService
- Parameters:
user
- user's name- Returns:
- group memberships of user
- Throws:
java.io.IOException
-
-