Package com.atlan.cache
Class AtlanTagCache
Lazily-loaded cache for translating between Atlan-internal ID strings and human-readable names for
Atlan tags.
-
Field Summary
Fields inherited from class com.atlan.cache.AbstractMassCache
bulkRefresh, lock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIdForName(String name, boolean allowRefresh) Translate the provided human-readable name to its Atlan-internal ID string.getNameForId(String id, boolean allowRefresh) Translate the provided Atlan-internal ID string to the human-readable name for the object.Translate the provided Atlan-internal Atlan tag ID string to the Atlan-internal name of the attribute that captures tag attachment details (for source-synced tags).getSourceTagsAttrId(String id, boolean allowRefresh) Translate the provided Atlan-internal Atlan tag ID string to the Atlan-internal name of the attribute that captures tag attachment details (for source-synced tags).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, cacheById, cacheByName, entrySet, getBulkRefresh, getById, getById, getByName, getByName, getIdForName, getIdFromName, getNameForId, getNameFromId, getObjectById, isEmpty, isIdKnown, isNameKnown, refresh
-
Constructor Details
-
AtlanTagCache
-
-
Method Details
-
refreshCache
Logic to refresh a specific cache en-masse (must be implemented).- Specified by:
refreshCachein classAbstractMassCache<AtlanTagDef>- Throws:
AtlanException- on any error communicating with Atlan to refresh the cache of objects
-
lookupByName
Logic to look up a single object for the cache.- Specified by:
lookupByNamein classAbstractMassCache<AtlanTagDef>- Parameters:
name- unique name for the object
-
lookupById
Logic to look up a single object for the cache.- Specified by:
lookupByIdin classAbstractMassCache<AtlanTagDef>- Parameters:
id- unique internal identifier for the object
-
getIdForName
Translate the provided human-readable name to its Atlan-internal ID string.- Overrides:
getIdForNamein classAbstractMassCache<AtlanTagDef>- Parameters:
name- human-readable name of the objectallowRefresh- whether to allow a refresh of the cache (true) or not (false)- Returns:
- unique Atlan-internal ID string for the object
- Throws:
AtlanException- on any API communication problem if the cache needs to be refreshedNotFoundException- if the object cannot be found (does not exist) in AtlanInvalidRequestException- if no name was provided for the object to retrieve
-
getNameForId
Translate the provided Atlan-internal ID string to the human-readable name for the object.- Overrides:
getNameForIdin classAbstractMassCache<AtlanTagDef>- Parameters:
id- Atlan-internal ID stringallowRefresh- whether to allow a refresh of the cache (true) or not (false)- Returns:
- human-readable name of the object
- Throws:
AtlanException- on any API communication problem if the cache needs to be refreshedNotFoundException- if the object cannot be found (does not exist) in AtlanInvalidRequestException- if no name was provided for the object to retrieve
-
getSourceTagsAttrId
Translate the provided Atlan-internal Atlan tag ID string to the Atlan-internal name of the attribute that captures tag attachment details (for source-synced tags).- Parameters:
id- Atlan-internal ID string of the Atlan tag- Returns:
- Atlan-internal ID string of the attribute containing source-synced tag attachment details
- Throws:
AtlanException- on any API communication problem if the cache needs to be refreshedNotFoundException- if the Atlan tag cannot be found (does not exist) in AtlanInvalidRequestException- if no ID was provided for the Atlan tag
-
getSourceTagsAttrId
Translate the provided Atlan-internal Atlan tag ID string to the Atlan-internal name of the attribute that captures tag attachment details (for source-synced tags).- Parameters:
id- Atlan-internal ID string of the Atlan tagallowRefresh- whether to allow a refresh of the cache (true) or not (false)- Returns:
- Atlan-internal ID string of the attribute containing source-synced tag attachment details
- Throws:
AtlanException- on any API communication problem if the cache needs to be refreshedNotFoundException- if the Atlan tag cannot be found (does not exist) in AtlanInvalidRequestException- if no ID was provided for the Atlan tag
-