Class StaticPropagationQueue<Tuple_ extends Tuple>
java.lang.Object
ai.timefold.solver.core.impl.bavet.common.StaticPropagationQueue<Tuple_>
- Type Parameters:
Tuple_-
- All Implemented Interfaces:
PropagationQueue<Tuple_>,Propagator
public final class StaticPropagationQueue<Tuple_ extends Tuple>
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
ConstructorsConstructorDescriptionStaticPropagationQueue(TupleLifecycle<Tuple_> nextNodesTupleLifecycle) StaticPropagationQueue(TupleLifecycle<Tuple_> nextNodesTupleLifecycle, int size) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidMust by preceded byPropagator.propagateRetracts()andPropagator.propagateUpdates().voidStarts the propagation event.voidMust be preceded byPropagator.propagateRetracts()and followed byPropagator.propagateInserts().voidretract(Tuple_ carrier, TupleState state) voidDouble updates of the same item count as a single update.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.impl.bavet.common.Propagator
propagateEverything
-
Constructor Details
-
StaticPropagationQueue
-
StaticPropagationQueue
-
-
Method Details
-
insert
- Specified by:
insertin interfacePropagationQueue<Tuple_ extends Tuple>
-
update
Description copied from interface:PropagationQueueDouble updates of the same item count as a single update.- Specified by:
updatein interfacePropagationQueue<Tuple_ extends Tuple>- Parameters:
carrier- the item to be updated in the propagation queue
-
retract
- Specified by:
retractin interfacePropagationQueue<Tuple_ extends Tuple>
-
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
-