TissueQueueBase<E, C extends TissueQueue<E>> class abstract

The foundational reactive engine for all double‑ended buffers in the cell_tissue ecosystem.

TissueQueueBase provides the concrete integration between the reactive TissueBase framework and the standard Dart Queue interface. It uses TissueQueueMixin (to implement the Queue contract) and the internal TissueBase to create a high‑performance, governed, and observable double‑ended buffer.

When to use

Only if you are extending the framework to build a custom queue variant that requires precise control over the mutation pipeline or storage behaviour. For standard use cases, the existing TissueQueue factories are sufficient.

You never use this class directly. It is the base class for the internal implementations that power both mutable queues (_TissueQueue) and read‑only views (_UnmodifiableTissueQueue). Your interaction with queues is through the factories on TissueQueue.

How it works

  • It extends TissueBase to inherit the core reactive lifecycle, synchronisation domain, and nucleus‑container architecture.
  • It mixes in TissueQueueMixin, which provides the full Queue API and routes all mutations through the apply command gateway.
  • Every structural change (adding to either end, removing, clearing) is:
    1. Validated against the TestTissue rules.
    2. Applied atomically to the Container (a Queue<E>).
    3. Dispatched as a TissuePulse to all observers.
  • The underlying storage is a Dart Queue<E> with O(1) head/tail operations.

Example (Internal Usage)

While you never instantiate this directly, understanding it helps you reason about how TissueQueue works:

final nucleus = TissueQueueNucleus.create<String>(capacity: 10);
final queue = _TissueQueue<String>(nucleus);
queue.add('A'); // Routed through `apply` -> validation -> pulse emission

Type Parameters:

  • E: The type of elements contained in the queue.
  • C: The specific Tissue implementation type (usually TissueQueue<E>), allowing for type‑safe pulse processing within the hierarchy.
Inheritance
Implemented types
Mixed-in types
Available extensions

Constructors

TissueQueueBase(TissueQueueNucleusBase<E, C> nucleus, {Iterable<E>? elements})
The primary constructor for a reactive double‑ended queue, responsible for materialising a live TissueQueue instance from its behavioural blueprint.

Properties

async → ModifiableQueueAsync<E>
Provides an asynchronous interface (ModifiableQueueAsync) for this queue.
no setteroverride
context → Context
The operational Context defining the forensic identity, administrative authority, and causal lineage of this specific Cell handle.
no setterinherited
first → E
The first element.
no setterinherited
firstOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The first element of this iterator, or null if the iterable is empty.
no setter
hashCode → int
Returns the hash code based on the underlying Container.
no setterinherited
id → String
Wire identity. Delegates to the nucleus so deputies and their principal share one id unless a graph registration overrides it.
no setterinherited
indexed → Iterable<(int, T)>

Available on Iterable<T>, provided by the IterableExtensions extension

Pairs of elements of the indices and elements of this iterable.
no setter
isEmpty → bool
Whether this collection has no elements.
no setterinherited
isGoverned → bool
Indicates whether this node is subject to active Administrative Oversight or specialized Lifecycle Governance.
no setterinherited
isInvalidated → bool
Indicates whether this Cell has initiated its Automatic Termination sequence and is currently in the process of being neutralized.
no setterinherited
isNotEmpty → bool
Whether this collection has at least one element.
no setterinherited
isTerminal → bool
A boolean indicator identifying whether this Cell acts as a Processing Sink within the reactive topology.
no setterinherited
iterator → Iterator<E>
Returns an Iterator that allows iterating over the elements of this tissue.
no setterinherited
last → E
The last element.
no setterinherited
lastOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The last element of this iterable, or null if the iterable is empty.
no setter
length → int
The number of elements in this Iterable.
no setterinherited
lock → Lock?
The synchronization Lock resolved from this tissue's nucleus.
no setterinherited
modifiable → Iterable<Function>
Defines the exhaustive whitelist of functions and commands authorized for execution on this node via the dynamic apply method.
no setterinherited
nonNulls → Iterable<T>

Available on Iterable<T?>, provided by the NullableIterableExtensions extension

The non-null elements of this iterable.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
single → E
Checks that this iterable has only one element, and returns that element.
no setterinherited
singleOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The single element of this iterator, or null.
no setter
skippedReport → Map<String, dynamic>?

Available on Tissue<E>, provided by the TissueSkippedReport extension

The {'wire': [...], 'decode': [...]} skip report, or null when no skip occurred.
no setter
toJSIterable → JSIterable<T>

Available on Iterable<T>, provided by the IterableToJSIterable extension

A JSIterable wrapper that proxies to the Dart iterable API.
no setter
unmodifiable → TissueQueue<E>
Returns an unmodifiable view of this queue.
no setteroverride
validate → TestTissue<E, C>
Returns the validation rule currently applied to this queue.
no setteroverride
wait → Future<List<T>>

Available on Iterable<Future<T>>, provided by the FutureIterable extension

Waits for futures concurrently.
no setter

Methods

add(E value) → void
Adds value at the end of the queue.
inherited
addAll(Iterable<E> iterable) → void
Adds all values iterable at the end of the queue.
inherited
addFirst(E value) → void
Adds value at the beginning of the queue.
inherited
addLast(E value) → void
Adds value at the end of the queue.
inherited
any(bool test(E element)) → bool
Checks whether any element of this iterable satisfies test.
inherited
apply<R>(ApplyCommand command, {ApplyTransactionScope? tx}) → FutureOr<ApplyOutcome<R>>
Submits a first-class ApplyCommand through the tissue dispatch engine.
inherited
asNameMap() → Map<String, T>

Available on Iterable<T>, provided by the EnumByName extension

Creates a map from the names of enum values to the values.
attach(dynamic context) → Iterable<Pulse>

Available on Iterable<Pulse>, provided by the PulseIterableExtension extension

Returns a new collection of pulses, each with the provided context metadata attached.
batch() → Pulse

Available on Iterable<Pulse>, provided by the PulseIterableExtension extension

Aggregates multiple signals into a single, flat CollectivePulse.
byName(String name) → T

Available on Iterable<T>, provided by the EnumByName extension

Finds the enum value in this list with name name.
cast<R>() → Queue<R>
A view of this iterable as an iterable of R instances.
inherited
clear() → void
Clears the queue.
inherited
command(Function function) → ApplyCommandRunner

Available on Cell, provided by the ApplyCommandDSL extension

Begins assembling a command that invokes function on this cell.
contains(Object? element) → bool
Whether the collection contains an element equal to element.
inherited
deputy({covariant DeputyContext context = DeputyContext.system, covariant TestTissue<dynamic, Tissue> testRule = TestTissue.allowAll, EphemeralPolicy<Cell>? ephemeralPolicy, Synapses<Pulse, Cell> synapses = Synapses.enabled}) → FutureOr<TissueQueue<E>>
Creates a delegated view (deputy) of this queue with specialised behavioural, security, and validation logic.
inherited
dispatch(Function function, {List? positionalArguments, Map<Symbol, dynamic>? namedArguments, bool sync = false}) → dynamic
The internal mutation dispatch engine, implemented by each tissue mixin.
inherited
elementAt(int index) → E
Returns the indexth element.
inherited
elementAtOrNull(int index) → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The element at position index of this iterable, or null.
every(bool test(E element)) → bool
Checks whether every element of this iterable satisfies test.
inherited
expand<T>(Iterable<T> toElements(E element)) → Iterable<T>
Expands each element of this Iterable into zero or more elements.
inherited
filter<S>({required bool test(S value)}) → FlowHandle

Available on Cell, provided by the CellFlowOperators extension

Materializes a Predicate Integrity Gate—a specialized orchestration instruction designed to conditionally permit pulse evolution.
firstWhere(bool test(E element), {E orElse()?}) → E
The first element that satisfies the given predicate test.
inherited
flatten() → Iterable<Pulse>

Available on Iterable<Pulse>, provided by the PulseIterableExtension extension

Recursively flattens any nested CollectivePulse structures into a sequence of simple pulses.
fold<T>(T initialValue, T combine(T previousValue, E element)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
followedBy(Iterable<E> other) → Iterable<E>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(E value)) → void
Invokes action on each element of this iterable in iteration order.
inherited
fromFuture<S>({required Future<S> future, Duration? timeout, FutureErrorHandler? onError, bool emitErrorPulse = true}) → FlowHandle

Available on Cell, provided by the CellFlowOperators extension

Synthesizes a Temporal Resource Bridge from a Future.
fromIterable<T>({required Iterable<T> iterable}) → FlowHandle

Available on Cell, provided by the CellFlowOperators extension

Synthesizes an Iterative Pulse Bridge from a dynamic iterable.
fromStream<S>({required Stream<S> stream, StreamErrorHandler? onError, bool emitErrorPulse = true}) → FlowHandle

Available on Cell, provided by the CellFlowOperators extension

Synthesizes a Continuous Pulse Bridge from a Stream.
join([String separator = ""]) → String
Converts each element to a String and concatenates the strings.
inherited
lastWhere(bool test(E element), {E orElse()?}) → E
The last element that satisfies the given predicate test.
inherited
map<S, T>({required T project(S value), MapErrorHandler? onError}) → FlowHandle

Available on Cell, provided by the CellFlowOperators extension

Materializes a Projective Evolution Gate—a fundamental instruction designed to transform stimulus payloads as they traverse the topography.
map<T>(T toElement(E e)) → Iterable<T>
The current elements of this iterable modified by toElement.
inherited
mapEach<T>(T mapper(dynamic payload)) → Iterable<Pulse<T>>

Available on Iterable<Pulse>, provided by the PulseIterableExtension extension

Transforms the payload of every pulse in the collection while preserving their individual causal traces.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
of<T>({required Iterable<T> values}) → FlowHandle

Available on Cell, provided by the CellFlowOperators extension

Synthesizes a Fixed Sequence Bridge from a provided collection.
range({required int start, required int count, int step = 1}) → FlowHandle

Available on Cell, provided by the CellFlowOperators extension

Synthesizes a Counted Pulse Generator—a specialized bridge designed to evolve a sequence of arithmetic integers.
reduce(E combine(E value, E element)) → E
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
remove(Object? object) → bool
Removes the first occurrence of value from the queue.
inherited
removeFirst() → E
Removes the first element from the queue.
inherited
removeLast() → E
Removes the last element from the queue.
inherited
removeWhere(bool test(E element)) → void
Removes all elements that satisfy the test condition.
inherited
repeat<T>({required T value, int count = 1}) → FlowHandle

Available on Cell, provided by the CellFlowOperators extension

Synthesizes a Recursive Stimulus Bridge—a specialized generator designed to evolve the same payload multiple times.
retainWhere(bool test(E element)) → void
Retains all elements that satisfy the test condition.
inherited
singleWhere(bool test(E element), {E orElse()?}) → E
The single element that satisfies test.
inherited
skip(int count) → Iterable<E>
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(E element)) → Iterable<E>
Creates an Iterable that skips leading elements while test is satisfied.
inherited
take(int count) → Iterable<E>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(E element)) → Iterable<E>
Creates a lazy iterable of the leading elements satisfying test.
inherited
tap<S>({required void onValue(S value), TapErrorHandler? onError}) → FlowHandle

Available on Cell, provided by the CellFlowOperators extension

Materializes a Passive Observation Gate—a specialized orchestration instruction designed to perform side-effects without altering pulse evolution.
toJson({bool lenient = false, TestTissue<dynamic, Tissue> lenientFallbackTestRule = TestTissue.readOnly}) → Map<String, dynamic>

Available on TissueQueue<E>, provided by the TissueQueueJson extension

Encodes this queue to its canonical JSON wire form.
toList({bool growable = true}) → List<E>
Creates a List containing the elements of this Iterable.
inherited
toSet() → Set<E>
Creates a Set containing the same elements as this iterable.
inherited
toString() → String
Returns a string representation of the underlying collection.
inherited
where(bool test(E element)) → Iterable<E>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
inherited
whereType<T>() → Iterable<R>
Creates a new lazy Iterable with all elements that have type T.
inherited
withStep(String step) → Iterable<Pulse>

Available on Iterable<Pulse>, provided by the PulseIterableExtension extension

Appends a diagnostic stage to the causal trace of every pulse in this collection.

Operators

operator ==(Object other) → bool
Provides structural equality for tissues.
inherited