Enum RedisProxy.ConnPoolSettings.ReadPolicy
- java.lang.Object
-
- java.lang.Enum<RedisProxy.ConnPoolSettings.ReadPolicy>
-
- io.envoyproxy.envoy.config.filter.network.redis_proxy.v2.RedisProxy.ConnPoolSettings.ReadPolicy
-
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<RedisProxy.ConnPoolSettings.ReadPolicy>
- 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 enumenvoy.config.filter.network.redis_proxy.v2.RedisProxy.ConnPoolSettings.ReadPolicy
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANYRead from any node of the cluster.MASTERDefault mode.PREFER_MASTERRead from the primary, but if it is unavailable, read from replica nodes.PREFER_REPLICARead from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not present or unhealthy), read from the primary.REPLICARead from replica nodes.UNRECOGNIZED
-
Field Summary
Fields Modifier and Type Field Description static intANY_VALUERead from any node of the cluster.static intMASTER_VALUEDefault mode.static intPREFER_MASTER_VALUERead from the primary, but if it is unavailable, read from replica nodes.static intPREFER_REPLICA_VALUERead from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not present or unhealthy), read from the primary.static intREPLICA_VALUERead from replica nodes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static RedisProxy.ConnPoolSettings.ReadPolicyforNumber(int value)static com.google.protobuf.Descriptors.EnumDescriptorgetDescriptor()com.google.protobuf.Descriptors.EnumDescriptorgetDescriptorForType()intgetNumber()com.google.protobuf.Descriptors.EnumValueDescriptorgetValueDescriptor()static com.google.protobuf.Internal.EnumLiteMap<RedisProxy.ConnPoolSettings.ReadPolicy>internalGetValueMap()static RedisProxy.ConnPoolSettings.ReadPolicyvalueOf(int value)Deprecated.static RedisProxy.ConnPoolSettings.ReadPolicyvalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)Returns the enum constant of this type with the specified name.static RedisProxy.ConnPoolSettings.ReadPolicyvalueOf(String name)Returns the enum constant of this type with the specified name.static RedisProxy.ConnPoolSettings.ReadPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MASTER
public static final RedisProxy.ConnPoolSettings.ReadPolicy MASTER
Default mode. Read from the current primary node.
MASTER = 0;
-
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;
-
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 Detail
-
MASTER_VALUE
public static final int MASTER_VALUE
Default mode. Read from the current primary node.
MASTER = 0;- See Also:
- Constant Field Values
-
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;- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
-
Method Detail
-
values
public static RedisProxy.ConnPoolSettings.ReadPolicy[] 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 (RedisProxy.ConnPoolSettings.ReadPolicy c : RedisProxy.ConnPoolSettings.ReadPolicy.values()) System.out.println(c);
- 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 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 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 nameNullPointerException- 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:
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
-
-