Enum Class MultiClusterGigaSpace.ReadMode
java.lang.Object
java.lang.Enum<MultiClusterGigaSpace.ReadMode>
org.openspaces.core.multicluster.MultiClusterGigaSpace.ReadMode
- All Implemented Interfaces:
Serializable, Comparable<MultiClusterGigaSpace.ReadMode>, Constable
- Enclosing interface:
MultiClusterGigaSpace
How read operations pick a cluster.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRead from one cluster: the read cluster if one is set withMultiClusterGigaSpace.setReadActiveCluster(String), otherwise the active cluster.Spread reads across healthy clusters in rotation, honouring cluster weights. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static MultiClusterGigaSpace.ReadMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READ_ACTIVE
Read from one cluster: the read cluster if one is set withMultiClusterGigaSpace.setReadActiveCluster(String), otherwise the active cluster. With no read cluster set this is the only mode that guarantees read-your-writes; with one set, a read sees a write only once it has been replicated there. If the cluster being read from is unreachable, the read moves that role to the next available cluster and is served from it, so a dead cluster costs one failover rather than every read. Inside a transaction, reads always go to the active cluster. -
READ_ROUND_ROBIN
Spread reads across healthy clusters in rotation, honouring cluster weights. Inside a transaction, reads go to the active cluster instead.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-