Class SpecializedProjectionIndexer
java.lang.Object
tools.refinery.interpreter.rete.network.BaseNode
tools.refinery.interpreter.rete.index.StandardIndexer
tools.refinery.interpreter.rete.index.SpecializedProjectionIndexer
- All Implemented Interfaces:
Iterable<Tuple>
,Indexer
,IterableIndexer
,ProjectionIndexer
,NetworkStructureChangeSensitiveNode
,Node
- Direct Known Subclasses:
IdentityIndexer
,NullIndexer
public abstract class SpecializedProjectionIndexer
extends StandardIndexer
implements ProjectionIndexer
A specialized projection indexer that can be memory-less (relying on an external source of information).
All specialized projection indexers of a single node will share the same listener list, so that notification order is maintained (see Bug 518434).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Infrastructure to share subscriptions between specialized indexers of the same parent node. -
Field Summary
FieldsFields inherited from class tools.refinery.interpreter.rete.index.StandardIndexer
mask, parent
Fields inherited from class tools.refinery.interpreter.rete.network.BaseNode
nodeId, reteContainer, tag, traceInfos
-
Constructor Summary
ConstructorsConstructorDescriptionSpecializedProjectionIndexer
(ReteContainer reteContainer, TupleMask mask, Supplier parent, Node activeNode, List<SpecializedProjectionIndexer.ListenerSubscription> subscriptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachListener
(IndexerListener listener) void
detachListener
(IndexerListener listener) This indexer will be updated whenever a Rete update is sent to the active node (or an equivalent time slot allotted to it).void
At the time of the invocation, the dependency graph has already been updated.protected void
propagate
(Direction direction, Tuple updateElement, Tuple signature, boolean change, Timestamp timestamp) abstract void
propagateToListener
(IndexerListener listener, Direction direction, Tuple updateElement, Timestamp timestamp) Methods inherited from class tools.refinery.interpreter.rete.index.StandardIndexer
assignTraceInfo, getContainer, getListeners, getMask, getParent, toStringCore
Methods inherited from class tools.refinery.interpreter.rete.network.BaseNode
acceptPropagatedTraceInfo, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface tools.refinery.interpreter.rete.index.Indexer
get, getListeners, getMask, getParent, getTimeline
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface tools.refinery.interpreter.rete.index.IterableIndexer
getBucketCount, getSignatures
Methods inherited from interface tools.refinery.interpreter.rete.network.Node
acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag
-
Field Details
-
activeNode
-
subscriptions
-
-
Constructor Details
-
SpecializedProjectionIndexer
public SpecializedProjectionIndexer(ReteContainer reteContainer, TupleMask mask, Supplier parent, Node activeNode, List<SpecializedProjectionIndexer.ListenerSubscription> subscriptions) - Since:
- 1.7
-
-
Method Details
-
getSubscriptions
-
getActiveNode
Description copied from interface:Indexer
This indexer will be updated whenever a Rete update is sent to the active node (or an equivalent time slot allotted to it). The active node is typically the indexer itself, but it can be a different node such as its parent.- Specified by:
getActiveNode
in interfaceIndexer
- Returns:
- the active node that operates this indexer
-
propagate
protected void propagate(Direction direction, Tuple updateElement, Tuple signature, boolean change, Timestamp timestamp) - Overrides:
propagate
in classStandardIndexer
-
attachListener
- Specified by:
attachListener
in interfaceIndexer
- Overrides:
attachListener
in classStandardIndexer
-
detachListener
- Specified by:
detachListener
in interfaceIndexer
- Overrides:
detachListener
in classStandardIndexer
-
networkStructureChanged
public void networkStructureChanged()Description copied from interface:NetworkStructureChangeSensitiveNode
At the time of the invocation, the dependency graph has already been updated.- Specified by:
networkStructureChanged
in interfaceNetworkStructureChangeSensitiveNode
- Overrides:
networkStructureChanged
in classStandardIndexer
-
propagateToListener
public abstract void propagateToListener(IndexerListener listener, Direction direction, Tuple updateElement, Timestamp timestamp) - Since:
- 2.4
-