Enum Class MetaCache

java.lang.Object
java.lang.Enum<MetaCache>
com.jbstrap.core.cache.MetaCache
All Implemented Interfaces:
Serializable, Comparable<MetaCache>, Constable

public enum MetaCache extends Enum<MetaCache>
Since:
4.0
Author:
JBStrap
  • Enum Constant Details

    • INSTANCE

      public static final MetaCache INSTANCE
  • Method Details

    • values

      public static MetaCache[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MetaCache valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • addDataDescriptor

      public void addDataDescriptor(DataDescriptor dataDescriptor)
      Parameters:
      dataDescriptor - The DataDescriptor to be added
      Throws:
      NullPointerException - If the specified DataDescriptor is null
      See Also:
    • getDataDescriptors

      public Collection<DataDescriptor> getDataDescriptors()
      Returns:
      Every DataDescriptor that is cached. If there aren't any, it will return with an empty Collection
      See Also:
    • getDataDescriptor

      public DataDescriptor getDataDescriptor(String name)
      Parameters:
      name - The name of the DataDescriptor
      Returns:
      The found DataDescriptor or null, if the specified DataDescriptor is not found
      Throws:
      NullPointerException - If the name was specified asnull
      See Also:
    • createGlobalDataStore

      public List<Record> createGlobalDataStore(String name)
      Create new empty data global data store by the specified name
      Parameters:
      name - The data store name (required)
      Returns:
      The created empty data store
      Throws:
      NullPointerException - If the name was specified asnull
    • getGlobalDataStore

      public List<Record> getGlobalDataStore(String name)
      Get the global data store by specified name
      Parameters:
      name - The nem if the data store
      Returns:
      The found data store or null, if the specified data store is not found
      Throws:
      NullPointerException - If the name was specified asnull
    • addFileStore

      public void addFileStore(FileStore fileStore)
      Parameters:
      fileStore - The file store to be added
      Throws:
      NullPointerException - If the file store is null
      IllegalArgumentException - If there's already a file store with the same name in the cache
      See Also:
    • getFileStores

      public Collection<FileStore> getFileStores()
      Returns:
      With a Collection of every file store that is in the cache. If there aren't any, returns with an empty collection
    • getFileStore

      public FileStore getFileStore(String name)
      Parameters:
      name - The file store name
      Returns:
      The file store or null, if the specified file store isn't found
      Throws:
      NullPointerException - If the file store name is null
    • removeFileStore

      public void removeFileStore(String name)
      Parameters:
      name - The name of the file store that needs to be deleted
      Throws:
      NullPointerException - If the name of the file store that needs to be deleted is null
    • readMeta

      public void readMeta() throws IOException
      Throws:
      IOException - If the reading of the XML file encounters an error IOException