Enum Class ModelConflictPolicy

java.lang.Object
java.lang.Enum<ModelConflictPolicy>
io.fluxzero.common.api.modeling.ModelConflictPolicy
All Implemented Interfaces:
Serializable, Comparable<ModelConflictPolicy>, Constable

public enum ModelConflictPolicy extends Enum<ModelConflictPolicy>
Runtime behavior when an commit-scoped model changed after the commit's readStateIndex.

Conflict rejection is deliberately optional. ACCEPT preserves Fluxzero's normal single-writer-friendly behavior: the original event is accepted, while stale derived documents, snapshots, and relationships are rebased by reapplying it to the latest values of the models actually read by the commit. Rejecting policies roll back the complete runtime commit; any retry is a new SDK evaluation against freshly loaded models.

  • Enum Constant Details

    • DEFAULT

      public static final ModelConflictPolicy DEFAULT
      Inherit from the next broader model-commit scope.
    • ACCEPT

      public static final ModelConflictPolicy ACCEPT
      Accept the original event and silently rebase stale derived state. This is the default.
    • FAIL

      public static final ModelConflictPolicy FAIL
      Reject a stale commit and let the client map the conflict to an application decision.
    • RETRY

      public static final ModelConflictPolicy RETRY
      Reject a stale commit and permit a bounded complete reevaluation against freshly loaded models and relations.
  • Method Details

    • values

      public static ModelConflictPolicy[] 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 ModelConflictPolicy 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
    • resolve

      public static ModelConflictPolicy resolve(ModelConflictPolicy policy)
      Resolves a missing wire value to the compatibility default.