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 tools.refinery.interpreter.rete.single.SingleInputNode
mailbox, parentFields inherited from class tools.refinery.interpreter.rete.network.StandardNode
childMailboxes, childrenFields inherited from class tools.refinery.interpreter.rete.network.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 tools.refinery.interpreter.rete.single.SingleInputNode
appendParent, assignTraceInfo, getCommunicationTracker, getMailbox, getParents, instantiateMailbox, propagatePullInto, propagatePullIntoWithTimestamp, removeParentMethods inherited from class tools.refinery.interpreter.rete.network.StandardNode
appendChild, constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, propagateUpdate, removeChildMethods inherited from class tools.refinery.interpreter.rete.network.BaseNode
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCoreMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.refinery.interpreter.rete.network.Node
acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTagMethods inherited from interface tools.refinery.interpreter.rete.network.Receiver
batchUpdateMethods inherited from interface tools.refinery.interpreter.rete.network.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
- Specified by:
pullIntoWithTimelinein interfaceSupplier
-
update
Description copied from interface:ReceiverUpdates the receiver with a newly found or lost partial matching. -
clear
public void 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
-