Package com.atlan.cache
Class RoleCache
- All Implemented Interfaces:
Closeable,AutoCloseable
Lazily-loaded cache for translating Atlan-internal roles into their various IDs.
-
Field Summary
Fields inherited from class com.atlan.cache.AbstractMassCache
bulkRefresh, client, lastRefresh, lock, needsRefresh, refreshLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the set of roles to which the current user belongs.protected voidlookupById(String id) Logic to look up a single object for the cache.protected voidlookupByName(String name) Logic to look up a single object for the cache.protected voidLogic to refresh a specific cache en-masse (must be implemented).Methods inherited from class com.atlan.cache.AbstractMassCache
cache, cache, cacheById, cacheByName, cacheBySid, close, entrySet, forceRefresh, getBulkRefresh, getById, getById, getByName, getByName, getBySid, getBySid, getIdForName, getIdForName, getIdForSid, getIdForSid, getIdFromName, getIdFromSid, getNameForId, getNameForId, getNameForSid, getNameForSid, getNameFromId, getNameFromId, getNameFromSid, getObjectById, getSidForName, getSidForName, getSidFromId, getSidFromName, isEmpty, isIdKnown, isNameKnown, lookupBySid, refreshIfNeeded
-
Constructor Details
-
RoleCache
-
-
Method Details
-
refreshCache
Logic to refresh a specific cache en-masse (must be implemented).- Specified by:
refreshCachein classAbstractMassCache<AtlanRole>- Throws:
AtlanException- on any error communicating with Atlan to refresh the cache of objects
-
lookupById
Logic to look up a single object for the cache.- Specified by:
lookupByIdin classAbstractMassCache<AtlanRole>- Parameters:
id- unique internal identifier for the object- Throws:
AtlanException- on any error communicating with Atlan
-
lookupByName
Logic to look up a single object for the cache.- Specified by:
lookupByNamein classAbstractMassCache<AtlanRole>- Parameters:
name- unique name for the object- Throws:
AtlanException- on any error communicating with Atlan
-
getRolesForCurrentUser
Retrieve the set of roles to which the current user belongs.- Returns:
- internal IDs of all the roles of the current user
- Throws:
AtlanException- on any cache refresh issues, if the cache needs to be refreshed
-