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

public static enum MultiClusterGigaSpace.ReadMode extends Enum<MultiClusterGigaSpace.ReadMode>
How read operations pick a cluster.
  • Enum Constant Details

    • READ_ACTIVE

      public static final MultiClusterGigaSpace.ReadMode READ_ACTIVE
      Read from one cluster: the read cluster if one is set with MultiClusterGigaSpace.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

      public static final MultiClusterGigaSpace.ReadMode 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

      public static MultiClusterGigaSpace.ReadMode[] 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

      public static MultiClusterGigaSpace.ReadMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null