Enum Class SharedCacheMode
- All Implemented Interfaces:
Serializable, Comparable<SharedCacheMode>, Constable
Enumerates policies which control how the provider determines if
an entity type is eligible for storage in the second-level cache.
A SharedCacheMode may be specified by the
<shared-cache-mode> element of persistence.xml
or by calling
PersistenceConfiguration.sharedCacheMode(SharedCacheMode).
- Since:
- 2.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEvery entity type associated with the persistence unit and all entity-related state and data is eligible for storage in the second-level cache.An entity type is eligible for storage in the second-level cache if and only if it is not annotatedCacheable(false).An entity type is eligible for storage in the second-level cache if and only if it is annotatedCacheableorCacheable(true).The second-level cache is disabled for the whole persistence unit.The persistence provider determines if an entity type is eligible for storage in the second-level cache, according to vendor-specific semantics. -
Method Summary
Modifier and TypeMethodDescriptionstatic SharedCacheModeReturns the enum constant of this class with the specified name.static SharedCacheMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALL
Every entity type associated with the persistence unit and all entity-related state and data is eligible for storage in the second-level cache. -
NONE
The second-level cache is disabled for the whole persistence unit. No entity type is eligible for storage in the second-level cache. -
ENABLE_SELECTIVE
An entity type is eligible for storage in the second-level cache if and only if it is annotatedCacheableorCacheable(true). -
DISABLE_SELECTIVE
An entity type is eligible for storage in the second-level cache if and only if it is not annotatedCacheable(false). -
UNSPECIFIED
The persistence provider determines if an entity type is eligible for storage in the second-level cache, according to vendor-specific semantics.
-
-
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
-