Class IdentityIndexer
java.lang.Object
tools.refinery.interpreter.rete.network.BaseNode
tools.refinery.interpreter.rete.index.StandardIndexer
tools.refinery.interpreter.rete.index.SpecializedProjectionIndexer
tools.refinery.interpreter.rete.index.IdentityIndexer
- All Implemented Interfaces:
Iterable<Tuple>
,Indexer
,IterableIndexer
,ProjectionIndexer
,NetworkStructureChangeSensitiveNode
,Node
- Direct Known Subclasses:
MemoryIdentityIndexer
,TimelyMemoryIdentityIndexer
Defines an abstract trivial indexer that identically projects the contents of some stateful node, and can therefore
save space. Can only exist in connection with a stateful store, and must be operated by another node (the active
node). Do not attach parents directly!
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.refinery.interpreter.rete.index.SpecializedProjectionIndexer
SpecializedProjectionIndexer.ListenerSubscription
-
Field Summary
Fields inherited from class tools.refinery.interpreter.rete.index.SpecializedProjectionIndexer
activeNode, subscriptions
Fields 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
ConstructorsConstructorDescriptionIdentityIndexer
(ReteContainer reteContainer, int tupleWidth, Supplier parent, Node activeNode, List<SpecializedProjectionIndexer.ListenerSubscription> sharedSubscriptionList) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
int
A view consisting of exactly those signatures whose tuple group is not emptyprotected abstract Collection
<Tuple> iterator()
void
propagateToListener
(IndexerListener listener, Direction direction, Tuple updateElement, Timestamp timestamp) Methods inherited from class tools.refinery.interpreter.rete.index.SpecializedProjectionIndexer
attachListener, detachListener, getActiveNode, getSubscriptions, networkStructureChanged, propagate
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
getListeners, getMask, getParent, getTimeline
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface tools.refinery.interpreter.rete.network.Node
acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag
-
Constructor Details
-
IdentityIndexer
public IdentityIndexer(ReteContainer reteContainer, int tupleWidth, Supplier parent, Node activeNode, List<SpecializedProjectionIndexer.ListenerSubscription> sharedSubscriptionList)
-
-
Method Details
-
getTuples
-
get
- Returns:
- all stored tuples that conform to the specified signature, null if there are none such. CONTRACT: do not modify!
-
contains
-
getSignatures
Description copied from interface:IterableIndexer
A view consisting of exactly those signatures whose tuple group is not empty -
getBucketCount
public int getBucketCount()- Returns:
- the number of signatures whose tuple group is not empty
-
iterator
-
propagateToListener
public void propagateToListener(IndexerListener listener, Direction direction, Tuple updateElement, Timestamp timestamp) - Specified by:
propagateToListener
in classSpecializedProjectionIndexer
-