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-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRead from any node of the cluster.Default mode.Read from the primary, but if it is unavailable, read from replica nodes.Read from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not present or unhealthy), read from the primary.Read from replica nodes. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intRead from any node of the cluster.static final intDefault mode.static final intRead from the primary, but if it is unavailable, read from replica nodes.static final intRead from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not present or unhealthy), read from the primary.static final intRead from replica nodes. -
Method Summary
Modifier and TypeMethodDescriptionforNumber(int value) static final com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<RedisProxy.ConnPoolSettings.ReadPolicy>valueOf(int value) Deprecated.valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.Returns the enum constant of this type with the specified name.values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MASTER
Default mode. Read from the current primary node.
MASTER = 0 [(.udpa.annotations.enum_value_migrate) = { ... } -
PREFER_MASTER
Read from the primary, but if it is unavailable, read from replica nodes.
PREFER_MASTER = 1 [(.udpa.annotations.enum_value_migrate) = { ... } -
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
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
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
-
-
Field Details
-
MASTER_VALUE
public static final int MASTER_VALUEDefault 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_VALUERead 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_VALUERead 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_VALUERead 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_VALUERead 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
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
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 nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
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 nameNullPointerException- if the argument is null
-
forNumber
- 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:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.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 nameNullPointerException- if the argument is null
-