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, children
nodeId, 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, removeChild
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
acceptPropagatedTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag
getPulledContents
protected 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)
Supplier
public void pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector, boolean flush)
pullIntoWithTimeline
in interface Supplier
protected 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)
Node
assignTraceInfo
in interface Node
assignTraceInfo
in class BaseNode
public void networkStructureChanged()
NetworkStructureChangeSensitiveNode
networkStructureChanged
in interface NetworkStructureChangeSensitiveNode
networkStructureChanged
in class StandardNode
protected abstract DualInputNode.NetworkStructureChangeSensitiveLogic createTimelyLogic()
protected abstract DualInputNode.NetworkStructureChangeSensitiveLogic createTimelessLogic()
protected void refreshIndexerGroupCache()