Package glide.api.models.configuration
Enum ReadFrom
- java.lang.Object
-
- java.lang.Enum<ReadFrom>
-
- glide.api.models.configuration.ReadFrom
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL_NODESSpread the read requests between all nodes (primary and replicas) in a round-robin manner.AZ_AFFINITYSpread the read requests between replicas in the same client's AZ (Aviliablity zone) in a round-robin manner, falling back to other replicas or the primary if needed.AZ_AFFINITY_REPLICAS_AND_PRIMARYSpread the read requests among nodes within the client's Availability Zone (AZ) in a round robin manner, prioritizing local replicas, then the local primary, and falling back to any replica or the primary if needed.PREFER_REPLICASpread the requests between all replicas in a round-robin manner.PRIMARYAlways get from primary, in order to get the freshest data.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReadFromvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ReadFrom[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PRIMARY
public static final ReadFrom PRIMARY
Always get from primary, in order to get the freshest data.
-
PREFER_REPLICA
public static final ReadFrom PREFER_REPLICA
Spread the requests between all replicas in a round-robin manner. If no replica is available, route the requests to the primary.
-
AZ_AFFINITY
public static final ReadFrom AZ_AFFINITY
Spread the read requests between replicas in the same client's AZ (Aviliablity zone) in a round-robin manner, falling back to other replicas or the primary if needed.
-
AZ_AFFINITY_REPLICAS_AND_PRIMARY
public static final ReadFrom AZ_AFFINITY_REPLICAS_AND_PRIMARY
Spread the read requests among nodes within the client's Availability Zone (AZ) in a round robin manner, prioritizing local replicas, then the local primary, and falling back to any replica or the primary if needed.
-
ALL_NODES
public static final ReadFrom ALL_NODES
Spread the read requests between all nodes (primary and replicas) in a round-robin manner.
-
-
Method Detail
-
values
public static ReadFrom[] 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 (ReadFrom c : ReadFrom.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReadFrom valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-