public class TransitiveClosureNode extends SingleInputNode implements Clearable, ITcObserver<java.lang.Object>, NetworkStructureChangeSensitiveNode
This node must not be used in recursive CommunicationGroup
s.
mailbox, parent
childMailboxes, children
nodeId, reteContainer, tag, traceInfos
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 |
networkStructureChanged()
At the time of the invocation, the dependency graph has already been updated.
|
void |
pullInto(java.util.Collection<Tuple> collector,
boolean flush)
Pulls the contents of this object in this particular moment into a target collection.
|
void |
pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector,
boolean flush) |
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,
Timestamp timestamp)
updates the receiver with a newly found or lost partial matching
|
appendParent, assignTraceInfo, getCommunicationTracker, getMailbox, getParents, instantiateMailbox, propagatePullInto, propagatePullIntoWithTimestamp, removeParent
appendChild, constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, propagateUpdate, removeChild
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag
appendChild, constructIndex, getPulledContents, getPulledContents, getReceivers, removeChild
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 networkStructureChanged()
NetworkStructureChangeSensitiveNode
networkStructureChanged
in interface NetworkStructureChangeSensitiveNode
networkStructureChanged
in class StandardNode
public void reinitializeWith(java.util.Collection<Tuple> tuples)
tuples
- the initial collection of tuplespublic void pullInto(java.util.Collection<Tuple> collector, boolean flush)
Supplier
public void pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector, boolean flush)
pullIntoWithTimeline
in interface Supplier
public void update(Direction direction, Tuple updateElement, Timestamp timestamp)
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