public abstract class DualInputNode extends StandardNode implements NetworkStructureChangeSensitiveNode
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DualInputNode.NetworkStructureChangeSensitiveLogic |
static class |
DualInputNode.Side |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
coincidence
true if the primary and secondary slots coincide
|
protected TupleMask |
complementerSecondaryMask
Optional complementer mask
|
protected java.util.Map<Indexer,java.lang.Boolean> |
indexerGroupCache
This map caches the result of a CommunicationTracker.areInSameGroup(indexer, this) call.
|
protected DualInputNode.NetworkStructureChangeSensitiveLogic |
logic |
protected IterableIndexer |
primarySlot
Holds the primary input slot of this node.
|
protected Indexer |
secondarySlot
Holds the secondary input slot of this node.
|
childMailboxes, childrennodeId, reteContainer, tag, traceInfos| Constructor and Description |
|---|
DualInputNode(ReteContainer reteContainer,
TupleMask complementerSecondaryMask) |
| Modifier and Type | Method and Description |
|---|---|
void |
assignTraceInfo(TraceInfo traceInfo)
assigns new traceability info to this node
|
abstract Tuple |
calibrate(Tuple primary,
Tuple secondary)
Simulates the behavior of the node for calibration purposes only.
|
void |
connectToIndexers(IterableIndexer primarySlot,
Indexer secondarySlot)
Should be called only once, when node is initialized.
|
protected DualInputNode.NetworkStructureChangeSensitiveLogic |
createLogic() |
protected abstract DualInputNode.NetworkStructureChangeSensitiveLogic |
createTimelessLogic() |
protected abstract DualInputNode.NetworkStructureChangeSensitiveLogic |
createTimelyLogic() |
IterableIndexer |
getPrimarySlot() |
Indexer |
getSecondarySlot() |
protected Indexer |
getSlot(DualInputNode.Side side)
Retrieves the slot corresponding to the specified side.
|
protected java.util.Map<Tuple,Timeline<Timestamp>> |
getTimeline(Tuple signature,
Indexer indexer) |
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) |
protected void |
refreshIndexerGroupCache() |
protected java.util.Collection<Tuple> |
retrieveOpposites(DualInputNode.Side side,
Tuple signature)
Helper: retrieves all stored substitutions from the opposite side memory.
|
void |
setComplementerSecondaryMask(TupleMask complementerSecondaryMask) |
protected Tuple |
unify(DualInputNode.Side side,
Tuple ps,
Tuple opposite)
Helper: unifies a substitution from the specified side with another substitution from the other side.
|
protected Tuple |
unify(Tuple left,
Tuple right)
Helper: unifies a left and right partial matching.
|
appendChild, constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, propagateUpdate, removeChildacceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCoreclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptPropagatedTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTaggetPulledContentsprotected DualInputNode.NetworkStructureChangeSensitiveLogic logic
protected IterableIndexer primarySlot
protected Indexer secondarySlot
protected TupleMask complementerSecondaryMask
protected boolean coincidence
protected java.util.Map<Indexer,java.lang.Boolean> indexerGroupCache
public DualInputNode(ReteContainer reteContainer, TupleMask complementerSecondaryMask)
reteContainer - public IterableIndexer getPrimarySlot()
public Indexer getSecondarySlot()
public void connectToIndexers(IterableIndexer primarySlot, Indexer secondarySlot)
protected java.util.Collection<Tuple> retrieveOpposites(DualInputNode.Side side, Tuple signature)
protected DualInputNode.NetworkStructureChangeSensitiveLogic createLogic()
protected Tuple unify(Tuple left, Tuple right)
public void pullInto(java.util.Collection<Tuple> collector, boolean flush)
Supplierpublic void pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector, boolean flush)
pullIntoWithTimeline in interface Supplierprotected Tuple unify(DualInputNode.Side side, Tuple ps, Tuple opposite)
public abstract Tuple calibrate(Tuple primary, Tuple secondary)
public void setComplementerSecondaryMask(TupleMask complementerSecondaryMask)
complementerSecondaryMask - the complementerSecondaryMask to setprotected Indexer getSlot(DualInputNode.Side side)
public void assignTraceInfo(TraceInfo traceInfo)
NodeassignTraceInfo in interface NodeassignTraceInfo in class BaseNodepublic void networkStructureChanged()
NetworkStructureChangeSensitiveNodenetworkStructureChanged in interface NetworkStructureChangeSensitiveNodenetworkStructureChanged in class StandardNodeprotected abstract DualInputNode.NetworkStructureChangeSensitiveLogic createTimelyLogic()
protected abstract DualInputNode.NetworkStructureChangeSensitiveLogic createTimelessLogic()
protected void refreshIndexerGroupCache()