public enum SessionBehavior extends Enum<SessionBehavior>
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.
Modifier and Type | Method and Description |
---|---|
static SessionBehavior |
of(String key) |
static SessionBehavior |
valueOf(String name)
Returns 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.
|
public static final SessionBehavior RELEASE
public static final SessionBehavior DELETE
public final String key
public static SessionBehavior[] values()
for (SessionBehavior c : SessionBehavior.values()) System.out.println(c);
public static SessionBehavior valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static SessionBehavior of(String key)
Copyright © 2024 Eclipse. All rights reserved.