void put(String name, T perm) {
      synchronized (mutex) {
        Set<T> perms = cache.getOrDefault(name, ConcurrentHashMap.newKeySet());
        perms.add(perm);
        cache.put(name, perms);
      }
    }
Cache of permissions, it is thread safe.
@param <T> T extends Permission
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AuthManager.java