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

public static enum ContextCache.PauseMode extends Enum<ContextCache.PauseMode>
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:
  • Enum Constant Details

    • ALWAYS

      public static final ContextCache.PauseMode ALWAYS
      Always pause inactive application contexts.
    • ON_CONTEXT_SWITCH

      public static final ContextCache.PauseMode ON_CONTEXT_SWITCH
      Only pause inactive application contexts if the next context retrieved from the cache is a different context.
    • NEVER

      public static final ContextCache.PauseMode NEVER
      Never pause inactive application contexts, effectively disabling the pausing feature of the ContextCache.
  • Method Details

    • values

      public static ContextCache.PauseMode[] 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 ContextCache.PauseMode 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
    • from

      public static @Nullable ContextCache.PauseMode from(@Nullable String name)
      Get the PauseMode enum 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 null if not found
      See Also: