Enum SessionBehavior

java.lang.Object
java.lang.Enum<SessionBehavior>
io.vertx.ext.consul.SessionBehavior
All Implemented Interfaces:
Serializable, Comparable<SessionBehavior>

public enum SessionBehavior extends Enum<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 Details

  • Field Details

    • key

      public final String key
  • Method Details

    • values

      public static SessionBehavior[] 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

      public static SessionBehavior valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • of

      public static SessionBehavior of(String key)