IteratingBatchNode<I, O> class
abstract
An abstract node that processes a batch of items by iterating over them.
IteratingBatchNode simplifies the process of applying an operation to each
item in a collection. Subclasses must implement the exec method, which
defines the logic for processing a single item. The node handles the
iteration and result aggregation.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- log ↔ void Function(String)
-
A function for logging messages.
getter/setter pairinherited
- maxRetries → int
-
The maximum number of times to retry the
execmethod upon failure. A value of 1 means theexecmethod will be attempted once. A value of 2 means it will be attempted once, and if it fails, it will be retried once more.finalinherited - name ↔ String?
-
The unique name of the node.
getter/setter pairinherited
-
params
↔ Map<
String, dynamic> -
The parameters for the node.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
successors
→ Map<
String, BaseNode> -
The successor nodes.
finalinherited
- wait → Duration
-
The duration to wait between retries. If
maxRetriesis greater than 1, this is the amount of time the node will pause before re-attempting theexecmethod.finalinherited
Methods
-
clone(
) → IteratingBatchNode< I, O> -
Creates a copy of this IteratingBatchNode.
override
-
createInstance(
) → BaseNode -
Creates a new instance of Node with the same constructor parameters.
inherited
-
exec(
covariant I item) → Future< O> -
The main execution logic for processing a single item.
override
-
execFallback(
dynamic prepResult, Exception error) → Future -
A fallback method that is called when the
execmethod fails after all retries have been exhausted.inherited -
next(
BaseNode node, {String action = 'default'}) → BaseNode -
Defines the next node in the sequence.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
dynamic prepResult, dynamic execResult) → Future -
Post-processing logic after
exec.inherited -
prep(
) → Future< List< I> > -
Prepares the batch of items for processing.
override
-
run(
) → Future< List< O> > -
Runs the batch processing by iterating over the items.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator -(
String action) → ConditionalTransition -
Creates a conditional transition with the given
action.inherited -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >>(
BaseNode other) → BaseNode -
Chains the current node to the
othernode.inherited