io.vertx.redis.client

## Enum RedisRole

- java.lang.Object
- - java.lang.Enum<RedisRole>
  - - io.vertx.redis.client.RedisRole

- All Implemented Interfaces:
    Serializable, Comparable<RedisRole>

      public enum RedisRole
      extends Enum<RedisRole>

  Define which kind of role to be used in HA mode.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `MASTER` Use a MASTER node connection.
    `REPLICA` Use a REPLICA node connection.
    `SENTINEL` Use a SENTINEL node connection.

  - ### Method Summary

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

    - #### MASTER

          public static final RedisRole MASTER

      Use a MASTER node connection.

    - #### REPLICA

          public static final RedisRole REPLICA

      Use a REPLICA node connection.

    - #### SENTINEL

          public static final RedisRole SENTINEL

      Use a SENTINEL node connection.

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

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

Copyright © 2021 Eclipse. All rights reserved.