Enum Class OperationClassifier.HandlePolicy

java.lang.Object
java.lang.Enum<OperationClassifier.HandlePolicy>
org.openspaces.core.multicluster.internal.OperationClassifier.HandlePolicy
All Implemented Interfaces:
Serializable, Comparable<OperationClassifier.HandlePolicy>, Constable
Enclosing class:
OperationClassifier

public static enum OperationClassifier.HandlePolicy extends Enum<OperationClassifier.HandlePolicy>
What to do with a method whose return value is a live handle onto a single cluster.

These are the methods the router cannot fix by routing the call itself: routing decides where the call goes, but the object that comes back keeps talking to whichever cluster produced it. A caller holding one has left the multi-cluster proxy behind without being told.

  • Enum Constant Details

    • REJECT

      public static final OperationClassifier.HandlePolicy REJECT
      Refuse the call. For handles that look like a whole space and are not: silently returning one cluster's would turn proxy.getClustered().write(x) into a single-cluster write with no fan-out, which is data divergence dressed up as a working call.
    • ACTIVE_CLUSTER

      public static final OperationClassifier.HandlePolicy ACTIVE_CLUSTER
      Answer from the active cluster, as documented. For narrower handles whose single-cluster meaning is the useful one - getSpace() is what a health check pings, and a type manager or transaction provider is per-space by nature.
  • Method Details

    • values

      public static OperationClassifier.HandlePolicy[] 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 OperationClassifier.HandlePolicy 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