Enum Class TransactionPolicy
- All Implemented Interfaces:
Serializable, Comparable<TransactionPolicy>, Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSuppress 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.Reject the operation with an exception, so nobody silently receives a non-atomic multi-cluster write. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionPolicyReturns the enum constant of this class with the specified name.static TransactionPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
-