Enum SessionBehavior
- All Implemented Interfaces:
Serializable, Comparable<SessionBehavior>
When a session is invalidated, it is destroyed and can no longer be used. What happens to the associated locks
depends on the behavior specified at creation time. Consul supports a release and delete behavior.
The release behavior is the default if none is specified.
If the release behavior is being used, any of the locks held in association with the session are released, and the ModifyIndex of the key is incremented. Alternatively, if the delete behavior is used, the key corresponding to any of the held locks is simply deleted. This can be used to create ephemeral entries that are automatically deleted by Consul.
- Author:
- Ruslan Sennov
- See Also:
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SessionBehaviorstatic SessionBehaviorReturns the enum constant of this type with the specified name.static SessionBehavior[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
RELEASE
-
DELETE
-
-
Field Details
-
key
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
of
-