Class CommitAttempt

java.lang.Object
io.fluxzero.sdk.modeling.CommitAttempt

public final class CommitAttempt extends Object
Internal state of one model commit attempt, from its loaded begin-state through ordered changes and completion. Instances used only as a handler read context leave the evaluation and completion portions empty.
  • Method Details

    • currentReadContext

      public static CommitAttempt currentReadContext(ModelRepository repository)
      Returns this repository's active mutation read context, never an event-replay or escaped async context.
    • trackGraph

      public <T> Graph<T> trackGraph(Graph<T> graph, ModelRepository repository)
      Attaches the same attempt provenance to a repository-created Graph without changing its snapshot.
    • withAncestorReads

      public CommitAttempt withAncestorReads(ModelAncestorResolver.AncestorReads reads)
      Retains identity-only proof used to resolve indirect injected Models at this context's pinned boundary.
    • ancestorReads

      public ModelAncestorResolver.AncestorReads ancestorReads()
      Returns the proof accompanying this context's ancestor selection, or null for direct targets.
    • withAliasResolutions

      public CommitAttempt withAliasResolutions(Map<String,String> aliases)
      Retains the lookup names that resolved injected read-only targets, including unresolved aliases.
    • aliasResolutions

      public Map<String,String> aliasResolutions()
      Internal loading provenance, separate from the canonically keyed loaded Models.
    • readRelationships

      public List<io.fluxzero.common.api.modeling.ModelRelationshipRead> readRelationships(io.fluxzero.common.api.modeling.ModelConflictPolicy policy)
      Returns the relationship dependencies relevant to the policy; ACCEPT excludes assertion-only reads.
    • readAliasIds

      public List<String> readAliasIds(io.fluxzero.common.api.modeling.ModelConflictPolicy policy)
      Returns consumed alias lookups, excluding assertion-only lookups for ACCEPT.
    • create

      public static CommitAttempt create(long readStateIndex, MutationPlan.Resolution resolution, Map<String, ? extends Entity<?>> loadedModels)
      Creates a loaded begin-state for one resolved target set.
    • createSingle

      public static CommitAttempt createSingle(long readStateIndex, String modelId, Class<?> modelType, MutationPlan.Access access, List<String> sourceProperties, Entity<?> entity)
      Creates the allocation-minimal begin-state used by a direct single-model strategy.
    • readStateIndex

      public long readStateIndex()
    • modelIds

      public List<String> modelIds()
    • targets

      public List<MutationPlan.ResolvedModel> targets()
    • target

      public MutationPlan.ResolvedModel target(String modelId)
    • entity

      public Entity<?> entity(String modelId)
    • entities

      public Map<String, Entity<?>> entities()
    • graphEntities

      public Map<String, Entity<?>> graphEntities()
      Loaded and staged values visible to Graph reads at this attempt's boundary.
    • attachTo

      public DeserializingMessage attachTo(DeserializingMessage message)
    • readModelIds

      public List<String> readModelIds()
    • readModelIds

      public List<String> readModelIds(io.fluxzero.common.api.modeling.ModelConflictPolicy policy)
      Reads needed to preserve this policy's evaluation: ACCEPT only reapplies its original steps.
    • steps

      public List<CommitAttempt.Step> steps()
    • transitions

      public List<Change> transitions()
    • cascadeRootIds

      public Set<String> cascadeRootIds()