Class EnumCache

java.lang.Object
com.atlan.cache.EnumCache

public class EnumCache extends Object
Lazily-loaded cache for accessing details of an enumeration.
  • Constructor Details

  • Method Details

    • refreshCache

      public void refreshCache() throws AtlanException
      Refreshes the cache of enumerations by requesting the full set of enumerations from Atlan.
      Throws:
      AtlanException - on any API communication problem
    • getObjectByName

      protected EnumDef getObjectByName(String name)
      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

      public EnumDef getByName(String name) throws AtlanException
      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 refreshed
      NotFoundException - if the enumeration cannot be found (does not exist) in Atlan
      InvalidRequestException - if no name was provided for the enumeration to retrieve
    • getByName

      public EnumDef getByName(String name, boolean allowRefresh) throws AtlanException
      Retrieve the enumeration definition by its name.
      Parameters:
      name - human-readable name of the enumeration
      allowRefresh - 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 refreshed
      NotFoundException - if the enumeration cannot be found (does not exist) in Atlan
      InvalidRequestException - if no name was provided for the enumeration to retrieve