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.

Inheritance

Constructors

IteratingBatchNode()

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 exec method upon failure. A value of 1 means the exec method 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 maxRetries is greater than 1, this is the amount of time the node will pause before re-attempting the exec method.
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 exec method 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(Map<String, dynamic> shared, dynamic prepResult, dynamic execResult) Future
Post-processing logic after exec.
inherited
prep(Map<String, dynamic> shared) Future<List<I>>
Prepares the batch of items for processing.
override
run(Map<String, dynamic> shared) 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 other node.
inherited