Class CommitAttempt
java.lang.Object
io.fluxzero.sdk.modeling.CommitAttempt
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classInternal signal: no commit was submitted, but a document used during evaluation has changed.static final recordOne ordered mutation journal entry. -
Method Summary
Modifier and TypeMethodDescriptionInternal loading provenance, separate from the canonically keyed loaded Models.Returns the proof accompanying this context's ancestor selection, ornullfor direct targets.attachTo(DeserializingMessage message) Attaches this attempt to the non-null message's context and returns that message.Returns the Model identifiers that initiate cascaded deletion in this attempt.static CommitAttemptcreate(long readStateIndex, MutationPlan.Resolution resolution, Map<String, ? extends Entity<?>> loadedModels) Creates a loaded begin-state for one resolved target set.static CommitAttemptcreateSingle(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.static CommitAttemptcurrentReadContext(ModelRepository repository) Returns this repository's active mutation read context, never an event-replay or escaped async context.static CommitAttemptcurrentReplayContext(ModelRepository repository) Returns this repository's active replay input; never borrows another application's or namespace's context.Entity<?> deadlineOrigin(String modelId) Original loaded revision retained before deadline evaluation stages changes for this attempt.voidEstablishes the namespace snapshot before exposing any additional transactional dependency.entities()Returns the loaded entity map and records all its identifiers when read collection is active.Entity<?> Returns the loaded entity for the Model identifier, or null if absent, and records the identifier when read collection is active.Loaded and staged values visible to Graph reads at this attempt's boundary.Input boundary for lazy Graph values and relationships, including earlier stored commit substeps.Alias mapping observations retained independently of assertion-only dependencies.booleanmodelIds()Returns an immutable list of resolved Model identifiers in resolution order.readAliasIds(ModelConflictPolicy policy) Returns consumed alias lookups, excluding assertion-only lookups for ACCEPT.Returns the Model identifiers retained as read dependencies for this attempt.readModelIds(ModelConflictPolicy policy) Reads needed to preserve this policy's evaluation: ACCEPT only reapplies its original steps.readRelationships(ModelConflictPolicy policy) Returns the relationship dependencies relevant to the policy; ACCEPT excludes assertion-only reads.booleanWhether this independent operation excludes uncommitted message-batch overlays.longReturns the attempt's read state index, using the deferred boundary when one is attached.static voidrequireNoAtomicCallback(ModelRepository repository) Internal guard before a public asynchronous mutation leaves its originating thread.steps()Returns the ordered message/change steps retained by this attempt.Returns the resolved target with the supplied Model identifier, or null if absent.targets()Returns the Models resolved as targets for this attempt.<T> Graph<T> trackGraph(Graph<T> graph, ModelRepository repository) Attaches the same attempt provenance to a repository-created Graph without changing its snapshot.Returns the Model changes retained by this attempt.withAliasResolutions(Map<String, String> aliases) Retains the lookup names that resolved injected read-only targets, including unresolved aliases.Retains identity-only proof used to resolve indirect injected Models at this context's pinned boundary.withDeferredBoundary(LongSupplier verification) Internal single-document loading provenance; copies share the same one-time verification.withReplayReads(ModelRepository repository, ModelReadBoundary boundary) Binds replay reads to their original input without joining live mutation/conflict tracking.
-
Method Details
-
withDeferredBoundary
Internal single-document loading provenance; copies share the same one-time verification. -
ensureReadBoundary
public void ensureReadBoundary()Establishes the namespace snapshot before exposing any additional transactional dependency. -
requireNoAtomicCallback
Internal guard before a public asynchronous mutation leaves its originating thread. -
currentReadContext
Returns this repository's active mutation read context, never an event-replay or escaped async context. -
withReplayReads
Binds replay reads to their original input without joining live mutation/conflict tracking. -
currentReplayContext
Returns this repository's active replay input; never borrows another application's or namespace's context. -
graphReadBoundary
Input boundary for lazy Graph values and relationships, including earlier stored commit substeps. -
readsDurableStateOnly
public boolean readsDurableStateOnly()Whether this independent operation excludes uncommitted message-batch overlays. -
trackGraph
Attaches the same attempt provenance to a repository-created Graph without changing its snapshot. -
identityReads
Alias mapping observations retained independently of assertion-only dependencies. -
withAncestorReads
Retains identity-only proof used to resolve indirect injected Models at this context's pinned boundary. -
ancestorReads
Returns the proof accompanying this context's ancestor selection, ornullfor direct targets. -
withAliasResolutions
Retains the lookup names that resolved injected read-only targets, including unresolved aliases. -
aliasResolutions
-
deadlineOrigin
-
readRelationships
Returns the relationship dependencies relevant to the policy; ACCEPT excludes assertion-only reads. -
readAliasIds
Returns consumed alias lookups, excluding assertion-only lookups for ACCEPT. -
deadlineUpdates
-
managesDeadlines
public boolean managesDeadlines() -
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()Returns the attempt's read state index, using the deferred boundary when one is attached. -
modelIds
-
targets
Returns the Models resolved as targets for this attempt. -
target
Returns the resolved target with the supplied Model identifier, or null if absent. -
entity
-
entities
-
graphEntities
-
attachTo
Attaches this attempt to the non-null message's context and returns that message. -
readModelIds
-
readModelIds
Reads needed to preserve this policy's evaluation: ACCEPT only reapplies its original steps. -
steps
Returns the ordered message/change steps retained by this attempt. -
transitions
-
cascadeRootIds
-