Record Class ModelReadBoundary
java.lang.Object
java.lang.Record
io.fluxzero.common.api.modeling.ModelReadBoundary
- Record Components:
stateIndex- namespace-wide state boundary, ornullfor an unpinned or opaque boundarycommitId- commit that defines the boundary, ornullsubstep- zero-based substep withincommitId, ornulleventIndex- event that defines the boundary, ornullbefore- whether the state immediately before the selected boundary is requestedincludeMessageBatch- whether staged values from the active message batch are visiblefallbackToCurrent- whether an unmappedeventIndexresolves to current state instead of failing
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ModelReadBoundaryUnpinned current-state boundary including active message-batch values. -
Constructor Summary
ConstructorsConstructorDescriptionModelReadBoundary(Long stateIndex, String commitId, Integer substep, Long eventIndex, boolean before, boolean includeMessageBatch, boolean fallbackToCurrent) Creates an instance of aModelReadBoundaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionasBefore()Returns the boundary immediately before this selection.static ModelReadBoundaryReturns a current boundary fornull, otherwise an exact state boundary.booleanbefore()Returns the value of thebeforerecord component.static ModelReadBoundaryCreates a boundary at a commit substep.commitId()Returns the value of thecommitIdrecord component.static ModelReadBoundarycurrent()Returns the shared current-state boundary.final booleanIndicates whether some other object is "equal to" this one.static ModelReadBoundaryevent(long eventIndex) Creates a boundary at an event index.Returns the value of theeventIndexrecord component.static ModelReadBoundaryeventOrCurrent(long eventIndex) Creates an event boundary that retains current-state behavior when the event has no Model mapping.booleanReturns the value of thefallbackToCurrentrecord component.Returns the durable selector form carried by a storage request.final inthashCode()Returns a hash code value for this object.booleanIndicates whether this selection refers to a durable historical boundary.booleanReturns the value of theincludeMessageBatchrecord component.resolved(long resolvedStateIndex) Pins this selection to the durable state returned by storage.resolved(long resolvedStateIndex, boolean includeMessageBatch) Pins this selection while explicitly retaining or excluding active message-batch values.static ModelReadBoundarystate(long stateIndex, boolean includeMessageBatch) Creates an exact state boundary with optional active message-batch visibility.Returns the value of thestateIndexrecord component.substep()Returns the value of thesubsteprecord component.final StringtoString()Returns a string representation of this record class.Returns this boundary without active message-batch visibility.
-
Field Details
-
CURRENT
Unpinned current-state boundary including active message-batch values.
-
-
Constructor Details
-
ModelReadBoundary
public ModelReadBoundary(Long stateIndex, String commitId, Integer substep, Long eventIndex, boolean before, boolean includeMessageBatch, boolean fallbackToCurrent) Creates an instance of aModelReadBoundaryrecord class.- Parameters:
stateIndex- the value for thestateIndexrecord componentcommitId- the value for thecommitIdrecord componentsubstep- the value for thesubsteprecord componenteventIndex- the value for theeventIndexrecord componentbefore- the value for thebeforerecord componentincludeMessageBatch- the value for theincludeMessageBatchrecord componentfallbackToCurrent- the value for thefallbackToCurrentrecord component
-
-
Method Details
-
current
Returns the shared current-state boundary. -
at
Returns a current boundary fornull, otherwise an exact state boundary. -
state
Creates an exact state boundary with optional active message-batch visibility. -
commit
Creates a boundary at a commit substep. -
event
Creates a boundary at an event index. -
eventOrCurrent
Creates an event boundary that retains current-state behavior when the event has no Model mapping. -
asBefore
Returns the boundary immediately before this selection. -
resolved
Pins this selection to the durable state returned by storage. -
resolved
Pins this selection while explicitly retaining or excluding active message-batch values. -
withoutMessageBatch
Returns this boundary without active message-batch visibility. -
historical
public boolean historical()Indicates whether this selection refers to a durable historical boundary. -
forRequest
Returns the durable selector form carried by a storage request. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
stateIndex
Returns the value of thestateIndexrecord component.- Returns:
- the value of the
stateIndexrecord component
-
commitId
-
substep
-
eventIndex
Returns the value of theeventIndexrecord component.- Returns:
- the value of the
eventIndexrecord component
-
before
-
includeMessageBatch
public boolean includeMessageBatch()Returns the value of theincludeMessageBatchrecord component.- Returns:
- the value of the
includeMessageBatchrecord component
-
fallbackToCurrent
public boolean fallbackToCurrent()Returns the value of thefallbackToCurrentrecord component.- Returns:
- the value of the
fallbackToCurrentrecord component
-