Package org.apache.iotdb.db.auth
Class BasicAuthorityCache
- java.lang.Object
-
- org.apache.iotdb.db.auth.BasicAuthorityCache
-
- All Implemented Interfaces:
IAuthorCache
public class BasicAuthorityCache extends java.lang.Object implements IAuthorCache
-
-
Constructor Summary
Constructors Constructor Description BasicAuthorityCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.iotdb.commons.auth.entity.RolegetRoleCache(java.lang.String roleName)org.apache.iotdb.commons.auth.entity.UsergetUserCache(java.lang.String userName)booleaninvalidateCache(java.lang.String userName, java.lang.String roleName)Initialize user and role cache information.voidputRoleCache(java.lang.String roleName, org.apache.iotdb.commons.auth.entity.Role role)voidputUserCache(java.lang.String userName, org.apache.iotdb.commons.auth.entity.User user)
-
-
-
Method Detail
-
getUserCache
public org.apache.iotdb.commons.auth.entity.User getUserCache(java.lang.String userName)
- Specified by:
getUserCachein interfaceIAuthorCache
-
getRoleCache
public org.apache.iotdb.commons.auth.entity.Role getRoleCache(java.lang.String roleName)
- Specified by:
getRoleCachein interfaceIAuthorCache
-
putUserCache
public void putUserCache(java.lang.String userName, org.apache.iotdb.commons.auth.entity.User user)- Specified by:
putUserCachein interfaceIAuthorCache
-
putRoleCache
public void putRoleCache(java.lang.String roleName, org.apache.iotdb.commons.auth.entity.Role role)- Specified by:
putRoleCachein interfaceIAuthorCache
-
invalidateCache
public boolean invalidateCache(java.lang.String userName, java.lang.String roleName)Initialize user and role cache information.If the permission information of the role changes, only the role cache information is cleared. During permission checking, if the role belongs to a user, the user will be initialized.
- Specified by:
invalidateCachein interfaceIAuthorCache
-
-