io.vertx.ext.consul

## Enum TxnKVVerb

- java.lang.Object
- - java.lang.Enum<TxnKVVerb>
  - - io.vertx.ext.consul.TxnKVVerb

- All Implemented Interfaces:
    Serializable, Comparable<TxnKVVerb>

      public enum TxnKVVerb
      extends Enum<TxnKVVerb>

  Holds type of KV operation in transaction
  Author:
    Ruslan Sennov
  See Also:
    /v1/txn endpoint

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CAS` Sets the Key to the given Value with check-and-set semantics.
    `CHECK_INDEX` Fails the transaction if Key does not have a modify index equal to Index
    `CHECK_SESSION` Fails the transaction if Key is not currently locked by Session
    `DELETE` Deletes the Key
    `DELETE_CAS` Deletes the Key with check-and-set semantics.
    `DELETE_TREE` Deletes all keys with a prefix ofKey
    `GET` Gets the Key during the transaction.
    `GET_TREE` Gets all keys with a prefix of Key during the transaction.
    `LOCK` Locks the Key with the given Session.
    `SET` Sets the Key to the given Value
    `UNLOCK` Unlocks the Key with the given Session.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getVerb()`
    `static TxnKVVerb` | `ofVerb(String verb)`
    `static TxnKVVerb` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static TxnKVVerb[]` | `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

    - #### SET

          public static final TxnKVVerb SET

      Sets the Key to the given Value

    - #### CAS

          public static final TxnKVVerb CAS

      Sets the Key to the given Value with check-and-set semantics. The Key will only be set if its current modify index matches the supplied Index

    - #### LOCK

          public static final TxnKVVerb LOCK

      Locks the Key with the given Session. The Key will only obtain the lock if the Session is valid, and no other session has it locked

    - #### UNLOCK

          public static final TxnKVVerb UNLOCK

      Unlocks the Key with the given Session. The Key will only release the lock if the Session is valid and currently has it locked

    - #### GET

          public static final TxnKVVerb GET

      Gets the Key during the transaction. This fails the transaction if the Key doesn't exist. The key may not be present in the results if ACLs do not permit it to be read

    - #### GET_TREE

          public static final TxnKVVerb GET_TREE

      Gets all keys with a prefix of Key during the transaction. This does not fail the transaction if the Key doesn't exist. Not all keys may be present in the results if ACLs do not permit them to be read

    - #### CHECK_INDEX

          public static final TxnKVVerb CHECK_INDEX

      Fails the transaction if Key does not have a modify index equal to Index

    - #### CHECK_SESSION

          public static final TxnKVVerb CHECK_SESSION

      Fails the transaction if Key is not currently locked by Session

    - #### DELETE

          public static final TxnKVVerb DELETE

      Deletes the Key

    - #### DELETE_TREE

          public static final TxnKVVerb DELETE_TREE

      Deletes all keys with a prefix ofKey

    - #### DELETE_CAS

          public static final TxnKVVerb DELETE_CAS

      Deletes the Key with check-and-set semantics. The Key will only be deleted if its current modify index matches the supplied Index

  - ### Method Detail

    - #### values

          public static TxnKVVerb[] 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 (TxnKVVerb c : TxnKVVerb.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static TxnKVVerb 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

    - #### ofVerb

          public static TxnKVVerb ofVerb(String verb)

    - #### getVerb

          public String getVerb()

Copyright © 2021 Eclipse. All rights reserved.