Enum Class ContextCache.PauseMode
java.lang.Object
java.lang.Enum<ContextCache.PauseMode>
org.springframework.test.context.cache.ContextCache.PauseMode
- All Implemented Interfaces:
Serializable, Comparable<ContextCache.PauseMode>, Constable
- Enclosing interface:
ContextCache
Enumeration of modes that dictate whether inactive application contexts
stored in the
ContextCache should be
paused.- Since:
- 7.0.3
- Author:
- Sam Brannen, Juergen Hoeller
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAlways pause inactive application contexts.Never pause inactive application contexts, effectively disabling the pausing feature of theContextCache.Only pause inactive application contexts if the next context retrieved from the cache is a different context. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ContextCache.PauseModeGet thePauseModeenum constant with the supplied name, stripped and ignoring case.static ContextCache.PauseModeReturns the enum constant of this class with the specified name.static ContextCache.PauseMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALWAYS
Always pause inactive application contexts. -
ON_CONTEXT_SWITCH
Only pause inactive application contexts if the next context retrieved from the cache is a different context. -
NEVER
Never pause inactive application contexts, effectively disabling the pausing feature of theContextCache.
-
-
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
-
from
Get thePauseModeenum constant with the supplied name, stripped and ignoring case.- Parameters:
name- the name of the enum constant to retrieve- Returns:
- the corresponding enum constant or
nullif not found - See Also:
-