Module lettuce.core

Enum RedisInstance.Role

java.lang.Object
java.lang.Enum<RedisInstance.Role>
io.lettuce.core.models.role.RedisInstance.Role
All Implemented Interfaces:
Serializable, Comparable<RedisInstance.Role>, java.lang.constant.Constable
Enclosing interface:
RedisInstance

public static enum RedisInstance.Role
extends Enum<RedisInstance.Role>
Possible Redis instance roles.
  • Enum Constant Details

  • Method Details

    • values

      public static RedisInstance.Role[] 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 RedisInstance.Role 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
    • isMaster

      public boolean isMaster()
      Returns:
      true if the role indicates that the role is a replication source.
      Since:
      6.0
    • isUpstream

      public boolean isUpstream()
      Returns:
      true if the role indicates that the role is a replication source.
      Since:
      6.1
    • isReplica

      public boolean isReplica()
      Returns:
      true if the role indicates that the role is a replicated node (replica).
      Since:
      6.0