Class AbstractJoinNode<LeftTuple_ extends Tuple,Right_,OutTuple_ extends Tuple,MutableOutTuple_ extends OutTuple_>
- java.lang.Object
-
- org.optaplanner.constraint.streams.bavet.common.AbstractNode
-
- org.optaplanner.constraint.streams.bavet.common.AbstractJoinNode<LeftTuple_,Right_,OutTuple_,MutableOutTuple_>
-
- Type Parameters:
LeftTuple_-Right_-
- All Implemented Interfaces:
LeftTupleLifecycle<LeftTuple_>,RightTupleLifecycle<UniTuple<Right_>>
- Direct Known Subclasses:
AbstractIndexedJoinNode,AbstractUnindexedJoinNode
public abstract class AbstractJoinNode<LeftTuple_ extends Tuple,Right_,OutTuple_ extends Tuple,MutableOutTuple_ extends OutTuple_> extends AbstractNode implements LeftTupleLifecycle<LeftTuple_>, RightTupleLifecycle<UniTuple<Right_>>
This class has two direct children:AbstractIndexedJoinNodeandAbstractUnindexedJoinNode. The logic in either is identical, except that the latter removes all indexing work. Therefore any time that one of the classes changes, the other should be inspected if it could benefit from applying the change there too.
-
-
Field Summary
Fields Modifier and Type Field Description protected Queue<OutTuple_>dirtyTupleQueue
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractJoinNode(TupleLifecycle<OutTuple_> nextNodesTupleLifecycle)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcalculateScore()protected abstract MutableOutTuple_createOutTuple(LeftTuple_ leftTuple, UniTuple<Right_> rightTuple)protected voidinsertTuple(Map<UniTuple<Right_>,MutableOutTuple_> outTupleMapLeft, LeftTuple_ leftTuple, UniTuple<Right_> rightTuple)protected voidretractTuple(OutTuple_ outTuple)protected abstract voidupdateOutTupleLeft(MutableOutTuple_ outTuple, LeftTuple_ leftTuple)protected abstract voidupdateOutTupleRight(MutableOutTuple_ outTuple, UniTuple<Right_> rightTuple)protected voidupdateTuple(OutTuple_ outTuple)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.optaplanner.constraint.streams.bavet.common.LeftTupleLifecycle
insertLeft, retractLeft, updateLeft
-
Methods inherited from interface org.optaplanner.constraint.streams.bavet.common.RightTupleLifecycle
insertRight, retractRight, updateRight
-
-
-
-
Constructor Detail
-
AbstractJoinNode
protected AbstractJoinNode(TupleLifecycle<OutTuple_> nextNodesTupleLifecycle)
-
-
Method Detail
-
createOutTuple
protected abstract MutableOutTuple_ createOutTuple(LeftTuple_ leftTuple, UniTuple<Right_> rightTuple)
-
updateOutTupleLeft
protected abstract void updateOutTupleLeft(MutableOutTuple_ outTuple, LeftTuple_ leftTuple)
-
updateOutTupleRight
protected abstract void updateOutTupleRight(MutableOutTuple_ outTuple, UniTuple<Right_> rightTuple)
-
insertTuple
protected final void insertTuple(Map<UniTuple<Right_>,MutableOutTuple_> outTupleMapLeft, LeftTuple_ leftTuple, UniTuple<Right_> rightTuple)
-
updateTuple
protected final void updateTuple(OutTuple_ outTuple)
-
retractTuple
protected final void retractTuple(OutTuple_ outTuple)
-
calculateScore
public final void calculateScore()
- Specified by:
calculateScorein classAbstractNode
-
-