Package com.atlan.cache
Class EnumCache
java.lang.Object
com.atlan.cache.EnumCache
Lazily-loaded cache for accessing details of an enumeration.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the enumeration definition by its name.Retrieve the enumeration definition by its name.protected EnumDef
getObjectByName
(String name) Thread-safe cache retrieval of the enumeration typedef, by its name.void
Refreshes the cache of enumerations by requesting the full set of enumerations from Atlan.
-
Constructor Details
-
EnumCache
-
-
Method Details
-
refreshCache
Refreshes the cache of enumerations by requesting the full set of enumerations from Atlan.- Throws:
AtlanException
- on any API communication problem
-
getObjectByName
Thread-safe cache retrieval of the enumeration typedef, by its name.- Parameters:
name
- of the EnumDef- Returns:
- the enumeration typedef itself (if cached), or null
-
getByName
Retrieve the enumeration definition by its name.- Parameters:
name
- human-readable name of the enumeration- Returns:
- the enumeration definition
- Throws:
AtlanException
- on any API communication problem if the cache needs to be refreshedNotFoundException
- if the enumeration cannot be found (does not exist) in AtlanInvalidRequestException
- if no name was provided for the enumeration to retrieve
-
getByName
Retrieve the enumeration definition by its name.- Parameters:
name
- human-readable name of the enumerationallowRefresh
- whether to allow a refresh of the cache (true) or not (false)- Returns:
- the enumeration definition
- Throws:
AtlanException
- on any API communication problem if the cache needs to be refreshedNotFoundException
- if the enumeration cannot be found (does not exist) in AtlanInvalidRequestException
- if no name was provided for the enumeration to retrieve
-