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.config.filter.network.redis_proxy.v2.RedisProxy.ConnPoolSettings.ReadPolicy| Enum Constant and Description |
|---|
ANY
Read from any node of the cluster.
|
MASTER
Default mode.
|
PREFER_MASTER
Read from the primary, but if it is unavailable, read from replica nodes.
|
PREFER_REPLICA
Read from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not
present or unhealthy), read from the primary.
|
REPLICA
Read from replica nodes.
|
UNRECOGNIZED |
| Modifier and Type | Field and Description |
|---|---|
static int |
ANY_VALUE
Read from any node of the cluster.
|
static int |
MASTER_VALUE
Default mode.
|
static int |
PREFER_MASTER_VALUE
Read from the primary, but if it is unavailable, read from replica nodes.
|
static 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.
|
static int |
REPLICA_VALUE
Read from replica nodes.
|
| Modifier and Type | Method and Description |
|---|---|
static RedisProxy.ConnPoolSettings.ReadPolicy |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<RedisProxy.ConnPoolSettings.ReadPolicy> |
internalGetValueMap() |
static RedisProxy.ConnPoolSettings.ReadPolicy |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static RedisProxy.ConnPoolSettings.ReadPolicy |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static RedisProxy.ConnPoolSettings.ReadPolicy |
valueOf(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.
|
public static final RedisProxy.ConnPoolSettings.ReadPolicy MASTER
Default mode. Read from the current primary node.
MASTER = 0;public static final RedisProxy.ConnPoolSettings.ReadPolicy PREFER_MASTER
Read from the primary, but if it is unavailable, read from replica nodes.
PREFER_MASTER = 1;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;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;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;public static final RedisProxy.ConnPoolSettings.ReadPolicy UNRECOGNIZED
public static final int MASTER_VALUE
Default mode. Read from the current primary node.
MASTER = 0;public static final int PREFER_MASTER_VALUE
Read from the primary, but if it is unavailable, read from replica nodes.
PREFER_MASTER = 1;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;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;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;public static RedisProxy.ConnPoolSettings.ReadPolicy[] values()
for (RedisProxy.ConnPoolSettings.ReadPolicy c : RedisProxy.ConnPoolSettings.ReadPolicy.values()) System.out.println(c);
public static RedisProxy.ConnPoolSettings.ReadPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static RedisProxy.ConnPoolSettings.ReadPolicy valueOf(int value)
forNumber(int) instead.public static RedisProxy.ConnPoolSettings.ReadPolicy forNumber(int value)
public static com.google.protobuf.Internal.EnumLiteMap<RedisProxy.ConnPoolSettings.ReadPolicy> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static RedisProxy.ConnPoolSettings.ReadPolicy valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2018–2021 The Envoy Project. All rights reserved.