Interface PropagationQueue<T>
-
- Type Parameters:
T-
- All Superinterfaces:
Propagator
- All Known Implementing Classes:
StaticPropagationQueue
public interface PropagationQueue<T> extends Propagator
A propagation queue is an ordered collection of items that need to be sent to the next node. This operation is called propagation.In order to properly update joins, removing stale data before joining is required. To that end, retracts need to be propagated first, then updates and finally inserts. Other than that, the order of propagation is the order of insertion into the queue.
Once an item propagates, it is set to a stable state that indicates it has been propagated, either
TupleState.OKorTupleState.DEAD. Subsequent nodes will only see their input tuples in these states.The propagation operation consists of three phases:
- Retracts:
Propagator.propagateRetracts() - Updates:
Propagator.propagateUpdates() - Inserts:
Propagator.propagateInserts()
The reason why these operations are not combined into a single method is the fact that multiple nodes may need to execute their retracts first, and only when all of those are propagated, the rest of the phases can start.
- See Also:
Even more information about propagation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinsert(T item)voidretract(T item, TupleState state)voidupdate(T item)-
Methods inherited from interface ai.timefold.solver.constraint.streams.bavet.common.Propagator
propagateEverything, propagateInserts, propagateRetracts, propagateUpdates
-
-
-
-
Method Detail
-
insert
void insert(T item)
-
update
void update(T item)
-
retract
void retract(T item, TupleState state)
-
-