Package org.springframework.session
Enum Class SaveMode
- All Implemented Interfaces:
Serializable
,Comparable<SaveMode>
,Constable
Supported modes of tracking and saving session changes to session store.
- Since:
- 2.2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAlways save all session attributes, regardless of the interaction with the session.Same asON_SET_ATTRIBUTE
with addition of saving attributes that have been read usingSession.getAttribute(String)
.Save only changes made to session, for instance usingSession.setAttribute(String, Object)
. -
Method Summary
-
Enum Constant Details
-
ON_SET_ATTRIBUTE
Save only changes made to session, for instance usingSession.setAttribute(String, Object)
. In highly concurrent environments, this mode minimizes the risk of attributes being overwritten during processing of parallel requests. -
ON_GET_ATTRIBUTE
Same asON_SET_ATTRIBUTE
with addition of saving attributes that have been read usingSession.getAttribute(String)
. -
ALWAYS
Always save all session attributes, regardless of the interaction with the session. In highly concurrent environments, this mode increases the risk of attributes being overwritten during processing of parallel requests.
-
-
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
-