Class StaticPropagationQueue<Tuple_ extends AbstractTuple>
- java.lang.Object
-
- ai.timefold.solver.constraint.streams.bavet.common.StaticPropagationQueue<Tuple_>
-
- Type Parameters:
Tuple_-
- All Implemented Interfaces:
PropagationQueue<Tuple_>,Propagator
public final class StaticPropagationQueue<Tuple_ extends AbstractTuple> extends Object implements PropagationQueue<Tuple_>
The implementation moves tuples directly into an either retract, update or insert queue, without any option of moving between the queues. This is the most efficient implementation. It will throw exceptions if a tuple is in the wrong queue, based on its state.
-
-
Constructor Summary
Constructors Constructor Description StaticPropagationQueue(TupleLifecycle<Tuple_> nextNodesTupleLifecycle)StaticPropagationQueue(TupleLifecycle<Tuple_> nextNodesTupleLifecycle, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinsert(Tuple_ carrier)voidpropagateInserts()Must by preceded byPropagator.propagateRetracts()andPropagator.propagateUpdates().voidpropagateRetracts()Starts the propagation event.voidpropagateUpdates()Must be preceded byPropagator.propagateRetracts()and followed byPropagator.propagateInserts().voidretract(Tuple_ carrier, TupleState state)voidupdate(Tuple_ carrier)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ai.timefold.solver.constraint.streams.bavet.common.Propagator
propagateEverything
-
-
-
-
Constructor Detail
-
StaticPropagationQueue
public StaticPropagationQueue(TupleLifecycle<Tuple_> nextNodesTupleLifecycle, int size)
-
StaticPropagationQueue
public StaticPropagationQueue(TupleLifecycle<Tuple_> nextNodesTupleLifecycle)
-
-
Method Detail
-
insert
public void insert(Tuple_ carrier)
- Specified by:
insertin interfacePropagationQueue<Tuple_ extends AbstractTuple>
-
update
public void update(Tuple_ carrier)
- Specified by:
updatein interfacePropagationQueue<Tuple_ extends AbstractTuple>
-
retract
public void retract(Tuple_ carrier, TupleState state)
- Specified by:
retractin interfacePropagationQueue<Tuple_ extends AbstractTuple>
-
propagateRetracts
public void propagateRetracts()
Description copied from interface:PropagatorStarts the propagation event. Must be followed byPropagator.propagateUpdates().- Specified by:
propagateRetractsin interfacePropagator
-
propagateUpdates
public void propagateUpdates()
Description copied from interface:PropagatorMust be preceded byPropagator.propagateRetracts()and followed byPropagator.propagateInserts().- Specified by:
propagateUpdatesin interfacePropagator
-
propagateInserts
public void propagateInserts()
Description copied from interface:PropagatorMust by preceded byPropagator.propagateRetracts()andPropagator.propagateUpdates(). Ends the propagation event and clears the queue.- Specified by:
propagateInsertsin interfacePropagator
-
-