Enum Class TransactionPolicy

java.lang.Object
java.lang.Enum<TransactionPolicy>
org.openspaces.core.multicluster.TransactionPolicy
All Implemented Interfaces:
Serializable, Comparable<TransactionPolicy>, Constable

public enum TransactionPolicy extends Enum<TransactionPolicy>
What the proxy does when a mutation is issued inside an active transaction while a fan-out write mode is configured.

There is no cross-cluster transaction manager: a transaction belongs to one space. Fanning a mutation out inside a transaction would give a write that is atomic on one cluster and unprotected on the others, so the proxy has to make a deliberate choice rather than pretend.

  • Enum Constant Details

    • ACTIVE_ONLY_WHEN_TRANSACTIONAL

      public static final TransactionPolicy ACTIVE_ONLY_WHEN_TRANSACTIONAL
      Suppress fan-out for the duration of the transaction and apply the mutation to the active cluster only; the other clusters converge through WAN replication or a later reconciliation. The default - it keeps transactional code working.
    • STRICT

      public static final TransactionPolicy STRICT
      Reject the operation with an exception, so nobody silently receives a non-atomic multi-cluster write. Pick this when correctness matters more than convenience.
  • Method Details

    • values

      public static TransactionPolicy[] 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 TransactionPolicy 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