Class BasicAuthorityCache

  • All Implemented Interfaces:
    IAuthorCache

    public class BasicAuthorityCache
    extends java.lang.Object
    implements IAuthorCache
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.iotdb.commons.auth.entity.Role getRoleCache​(java.lang.String roleName)  
      org.apache.iotdb.commons.auth.entity.User getUserCache​(java.lang.String userName)  
      boolean invalidateCache​(java.lang.String userName, java.lang.String roleName)
      Initialize user and role cache information.
      void putRoleCache​(java.lang.String roleName, org.apache.iotdb.commons.auth.entity.Role role)  
      void putUserCache​(java.lang.String userName, org.apache.iotdb.commons.auth.entity.User user)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BasicAuthorityCache

        public BasicAuthorityCache()
    • Method Detail

      • getUserCache

        public org.apache.iotdb.commons.auth.entity.User getUserCache​(java.lang.String userName)
        Specified by:
        getUserCache in interface IAuthorCache
      • getRoleCache

        public org.apache.iotdb.commons.auth.entity.Role getRoleCache​(java.lang.String roleName)
        Specified by:
        getRoleCache in interface IAuthorCache
      • putUserCache

        public void putUserCache​(java.lang.String userName,
                                 org.apache.iotdb.commons.auth.entity.User user)
        Specified by:
        putUserCache in interface IAuthorCache
      • putRoleCache

        public void putRoleCache​(java.lang.String roleName,
                                 org.apache.iotdb.commons.auth.entity.Role role)
        Specified by:
        putRoleCache in interface IAuthorCache
      • 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:
        invalidateCache in interface IAuthorCache