Package com.jbstrap.core.cache
Enum Class MetaCache
- All Implemented Interfaces:
Serializable
,Comparable<MetaCache>
,Constable
- Since:
- 4.0
- Author:
- JBStrap
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataDescriptor
(DataDescriptor dataDescriptor) void
addFileStore
(FileStore fileStore) createGlobalDataStore
(String name) Create new empty data global data store by the specified namegetDataDescriptor
(String name) getFileStore
(String name) getGlobalDataStore
(String name) Get the global data store by specified namevoid
readMeta()
void
removeFileStore
(String name) static MetaCache
Returns the enum constant of this class with the specified name.static MetaCache[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
addDataDescriptor
- Parameters:
dataDescriptor
- The DataDescriptor to be added- Throws:
NullPointerException
- If the specified DataDescriptor isnull
- See Also:
-
getDataDescriptors
- Returns:
- Every DataDescriptor that is cached. If there aren't any, it will return with an empty Collection
- See Also:
-
getDataDescriptor
- 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
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
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
- Parameters:
fileStore
- The file store to be added- Throws:
NullPointerException
- If the file store isnull
IllegalArgumentException
- If there's already a file store with the same name in the cache- See Also:
-
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
- 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 isnull
-
removeFileStore
- 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 isnull
-
readMeta
- Throws:
IOException
- If the reading of the XML file encounters an errorIOException
-