IndexAllocatorModel class
Transaction-level model of FIFO-reuse index allocation.
Free indices form a queue: allocation takes the head and an accepted
release appends to the tail, as in MemoryIndexAllocator and
FreeIndexQueue. Within one clock edge, apply an accepted allocation
before an accepted release. The model tracks only public ownership and free
order. It intentionally omits an irrevocable channel's temporarily retained
offer and an implementation's initialization or prefetch latency, which are
protocol state rather than allocated index state.
- Mixed-in types
Constructors
-
IndexAllocatorModel({required int capacity, Iterable<
int> ? initiallyAvailableIndices}) - Creates an index allocator model.
Properties
- availableCount → int
-
Number of indices available for allocation.
no setter
- capabilities → StateTransactionCapabilities
-
Static software transaction behavior.
no setterinherited
- capacity → int
-
Number of managed indices.
final
- exhausted → bool
-
Whether no index is available.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- image → IndexAllocatorOwnershipImage
-
Current immutable ownership image.
no setteroverride
- offeredIndex → int?
-
Index at the head of the free queue, without acquiring it.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stateTransactions
→ StateTransactionEndpoint<
IndexAllocatorOwnershipImage> -
This model's software transaction endpoint.
no setterinherited
Methods
-
allocate(
) → int? - Acquires and returns the index at the head of the free queue.
-
load(
covariant IndexAllocatorOwnershipImage image) → void -
Replaces ownership from a compatible image.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
int index) → IndexAllocatorReleaseResult -
Returns ownership of
indexto the tail of the free queue. -
reset(
) → void - Restores the configured reset ownership and free order.
-
toString(
) → String -
A string representation of this object.
inherited
-
transact(
StateTransactionRequest< IndexAllocatorOwnershipImage> request, {bool quiescent = false}) → StateTransactionCompletion<IndexAllocatorOwnershipImage> -
Accepts a request and returns its completion.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited