Package io.vertx.ext.consul

## 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:
    Consul sessions documentation

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---
    `DELETE` |
    `RELEASE` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `String` | `key` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | 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.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### RELEASE

          public static final SessionBehavior RELEASE

    - #### DELETE

          public static final SessionBehavior DELETE

  - ### Field Detail

    - #### key

          public final String key

  - ### Method Detail

    - #### values

          public static SessionBehavior[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (SessionBehavior c : SessionBehavior.values())
              System.out.println(c);

      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)