Enum Class PdoCacheStrategy
- All Implemented Interfaces:
Serializable, Comparable<PdoCacheStrategy>, Constable
Eviction strategy for the PDO-cache.
- Author:
- harald
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIf a PDO is not in the cache, it will be loaded from the database.
When the maximum size of the cache reached, the cache is purged completely.If a PDO is not in the cache, it will be loaded from the database.
When the maximum size of the cache reached, the least frequently used PDOs are removed from the cache, according to a keep-quota.If a PDO is not in the cache, it will be loaded from the database.
When the maximum size of the cache reached, the least recently used PDOs are removed from the cache, according to a keep-quota.Preload all PDOs.
This is the default and works for the majority of master-data entities.
The first select from the cache will load all entities from the database so that further selects will not need a physical load from the database. -
Method Summary
Modifier and TypeMethodDescriptionstatic PdoCacheStrategyReturns the enum constant of this class with the specified name.static PdoCacheStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRELOAD
Preload all PDOs.
This is the default and works for the majority of master-data entities.
The first select from the cache will load all entities from the database so that further selects will not need a physical load from the database. -
FORGET
If a PDO is not in the cache, it will be loaded from the database.
When the maximum size of the cache reached, the cache is purged completely. -
LRU
If a PDO is not in the cache, it will be loaded from the database.
When the maximum size of the cache reached, the least recently used PDOs are removed from the cache, according to a keep-quota. -
LFU
If a PDO is not in the cache, it will be loaded from the database.
When the maximum size of the cache reached, the least frequently used PDOs are removed from the cache, according to a keep-quota.
-
-
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
-