Enum RedisProxy.ConnPoolSettings.ReadPolicy

java.lang.Object
java.lang.Enum<RedisProxy.ConnPoolSettings.ReadPolicy>
io.envoyproxy.envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.ReadPolicy
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<RedisProxy.ConnPoolSettings.ReadPolicy>, java.lang.constant.Constable
Enclosing class:
RedisProxy.ConnPoolSettings

public static enum RedisProxy.ConnPoolSettings.ReadPolicy extends Enum<RedisProxy.ConnPoolSettings.ReadPolicy> implements com.google.protobuf.ProtocolMessageEnum
 ReadPolicy controls how Envoy routes read commands to Redis nodes. This is currently
 supported for Redis Cluster. All ReadPolicy settings except MASTER may return stale data
 because replication is asynchronous and requires some delay. You need to ensure that your
 application can tolerate stale data.
 
Protobuf enum envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.ReadPolicy
  • Enum Constant Details

    • MASTER

      public static final RedisProxy.ConnPoolSettings.ReadPolicy MASTER
       Default mode. Read from the current primary node.
       
      MASTER = 0 [(.udpa.annotations.enum_value_migrate) = { ... }
    • PREFER_MASTER

      public static final RedisProxy.ConnPoolSettings.ReadPolicy PREFER_MASTER
       Read from the primary, but if it is unavailable, read from replica nodes.
       
      PREFER_MASTER = 1 [(.udpa.annotations.enum_value_migrate) = { ... }
    • REPLICA

      public static final RedisProxy.ConnPoolSettings.ReadPolicy REPLICA
       Read from replica nodes. If multiple replica nodes are present within a shard, a random
       node is selected. Healthy nodes have precedent over unhealthy nodes.
       
      REPLICA = 2;
    • PREFER_REPLICA

      public static final RedisProxy.ConnPoolSettings.ReadPolicy PREFER_REPLICA
       Read from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not
       present or unhealthy), read from the primary.
       
      PREFER_REPLICA = 3;
    • ANY

      public static final RedisProxy.ConnPoolSettings.ReadPolicy ANY
       Read from any node of the cluster. A random node is selected among the primary and
       replicas, healthy nodes have precedent over unhealthy nodes.
       
      ANY = 4;
    • UNRECOGNIZED

      public static final RedisProxy.ConnPoolSettings.ReadPolicy UNRECOGNIZED
  • Field Details

    • MASTER_VALUE

      public static final int MASTER_VALUE
       Default mode. Read from the current primary node.
       
      MASTER = 0 [(.udpa.annotations.enum_value_migrate) = { ... }
      See Also:
    • PREFER_MASTER_VALUE

      public static final int PREFER_MASTER_VALUE
       Read from the primary, but if it is unavailable, read from replica nodes.
       
      PREFER_MASTER = 1 [(.udpa.annotations.enum_value_migrate) = { ... }
      See Also:
    • REPLICA_VALUE

      public static final int REPLICA_VALUE
       Read from replica nodes. If multiple replica nodes are present within a shard, a random
       node is selected. Healthy nodes have precedent over unhealthy nodes.
       
      REPLICA = 2;
      See Also:
    • PREFER_REPLICA_VALUE

      public static final int PREFER_REPLICA_VALUE
       Read from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not
       present or unhealthy), read from the primary.
       
      PREFER_REPLICA = 3;
      See Also:
    • ANY_VALUE

      public static final int ANY_VALUE
       Read from any node of the cluster. A random node is selected among the primary and
       replicas, healthy nodes have precedent over unhealthy nodes.
       
      ANY = 4;
      See Also:
  • Method Details

    • values

      public static RedisProxy.ConnPoolSettings.ReadPolicy[] 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 RedisProxy.ConnPoolSettings.ReadPolicy 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
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static RedisProxy.ConnPoolSettings.ReadPolicy valueOf(int value)
      Deprecated.
      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:
      value - 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
    • forNumber

      public static RedisProxy.ConnPoolSettings.ReadPolicy forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<RedisProxy.ConnPoolSettings.ReadPolicy> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static RedisProxy.ConnPoolSettings.ReadPolicy valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      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:
      desc - 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