Class TransitiveClosureNode
java.lang.Object
tools.refinery.interpreter.rete.network.BaseNode
tools.refinery.interpreter.rete.network.StandardNode
tools.refinery.interpreter.rete.single.SingleInputNode
tools.refinery.interpreter.rete.single.TransitiveClosureNode
- All Implemented Interfaces:
Clearable, ITcObserver<Object>, NetworkStructureChangeSensitiveNode, Node, Receiver, ReinitializedNode, Supplier, Tunnel
public class TransitiveClosureNode
extends SingleInputNode
implements Clearable, ITcObserver<Object>, NetworkStructureChangeSensitiveNode, ReinitializedNode
This class represents a transitive closure node in the Rete net.
This node must not be used in recursive CommunicationGroups.
-
Field Summary
Fields inherited from class SingleInputNode
mailbox, parentFields inherited from class StandardNode
childMailboxes, childrenFields inherited from class BaseNode
nodeId, reteContainer, tag, traceInfos -
Constructor Summary
ConstructorsConstructorDescriptionTransitiveClosureNode(ReteContainer reteContainer) Create a new transitive closure rete node. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidAt the time of the invocation, the dependency graph has already been updated.voidpullInto(Collection<Tuple> collector, boolean flush) Pulls the contents of this object in this particular moment into a target collection.voidpullIntoWithTimeline(Map<Tuple, Timeline<Timestamp>> collector, boolean flush) voidreinitializeWith(Collection<Tuple> tuples) Initializes the graph data source with the given collection of tuples.voidtupleDeleted(Object source, Object target) Used to notify when a tuple is deleted from the transitive closure relation.voidtupleInserted(Object source, Object target) Used to notify when a tuple is inserted into the transitive closure relation.voidUpdates the receiver with a newly found or lost partial matching.Methods inherited from class SingleInputNode
appendParent, assignTraceInfo, getCommunicationTracker, getMailbox, getParents, instantiateMailbox, propagatePullInto, propagatePullIntoWithTimestamp, removeParentMethods inherited from class StandardNode
appendChild, constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, propagateUpdate, removeChildMethods inherited from class BaseNode
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCoreMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Node
acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTagMethods inherited from interface Receiver
batchUpdateMethods inherited from interface Supplier
appendChild, constructIndex, getPulledContents, getPulledContents, getReceivers, removeChild
-
Constructor Details
-
TransitiveClosureNode
Create a new transitive closure rete node. Client may optionally callreinitializeWith(Collection)before using the node, instead of inserting the initial set of tuples one by one.- Parameters:
reteContainer- the rete container of the node
-
-
Method Details
-
networkStructureChanged
public void networkStructureChanged()Description copied from interface:NetworkStructureChangeSensitiveNodeAt the time of the invocation, the dependency graph has already been updated.- Specified by:
networkStructureChangedin interfaceNetworkStructureChangeSensitiveNode- Overrides:
networkStructureChangedin classStandardNode
-
reinitializeWith
Initializes the graph data source with the given collection of tuples.- Specified by:
reinitializeWithin interfaceReinitializedNode- Parameters:
tuples- the initial collection of tuples
-
pullInto
Description copied from interface:SupplierPulls the contents of this object in this particular moment into a target collection. -
pullIntoWithTimeline
-
update
-
clear
-
tupleInserted
Description copied from interface:ITcObserverUsed to notify when a tuple is inserted into the transitive closure relation.- Specified by:
tupleInsertedin interfaceITcObserver<Object>- Parameters:
source- the source of the tupletarget- the target of the tuple
-
tupleDeleted
Description copied from interface:ITcObserverUsed to notify when a tuple is deleted from the transitive closure relation.- Specified by:
tupleDeletedin interfaceITcObserver<Object>- Parameters:
source- the source of the tupletarget- the target of the tuple
-