public class TransitiveClosureNode extends SingleInputNode implements Clearable, ITcObserver<java.lang.Object>
Constructor and Description |
---|
TransitiveClosureNode(ReteContainer reteContainer)
Create a new transitive closure rete node.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all partial matchings stored in memory
|
void |
pullInto(java.util.Collection<Tuple> collector)
pulls the contents of this object in this particular moment into a target collection
|
void |
reinitializeWith(java.util.Collection<Tuple> tuples)
Initializes the graph data source with the given collection of tuples.
|
void |
tupleDeleted(java.lang.Object source,
java.lang.Object target)
Used to notify when a tuple is deleted from the transitive closure relation.
|
void |
tupleInserted(java.lang.Object source,
java.lang.Object target)
Used to notify when a tuple is inserted into the transitive closure relation.
|
void |
update(Direction direction,
Tuple updateElement)
updates the receiver with a newly found or lost partial matching
|
appendParent, assignTraceInfo, getParents, propagatePullInto, removeParent
appendChild, constructIndex, getPulledContents, getReceivers, removeChild
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfos, setTag, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendChild, constructIndex, getPulledContents, getReceivers, removeChild
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfos, setTag
public TransitiveClosureNode(ReteContainer reteContainer)
reinitializeWith(Collection)
before using the node,
instead of inserting the initial set of tuples one by one.reteContainer
- the rete container of the nodepublic void reinitializeWith(java.util.Collection<Tuple> tuples)
tuples
- the initial collection of tuplespublic void pullInto(java.util.Collection<Tuple> collector)
Supplier
public void update(Direction direction, Tuple updateElement)
Receiver
public void clear()
Clearable
public void tupleInserted(java.lang.Object source, java.lang.Object target)
ITcObserver
tupleInserted
in interface ITcObserver<java.lang.Object>
source
- the source of the tupletarget
- the target of the tuplepublic void tupleDeleted(java.lang.Object source, java.lang.Object target)
ITcObserver
tupleDeleted
in interface ITcObserver<java.lang.Object>
source
- the source of the tupletarget
- the target of the tuple