Class IndexerBasedAggregatorNode
java.lang.Object
tools.refinery.interpreter.rete.network.BaseNode
tools.refinery.interpreter.rete.network.StandardNode
tools.refinery.interpreter.rete.aggregation.IndexerBasedAggregatorNode
- All Implemented Interfaces:
IAggregatorNode,NetworkStructureChangeSensitiveNode,Node,Supplier
- Direct Known Subclasses:
CountNode
A special node depending on a projection indexer to aggregate tuple groups with the same projection. Only propagates
the aggregates of non-empty groups. Use the outer indexers to circumvent.
This node cannot be used in recursive differential dataflow evaluation.
- Since:
- 1.4
-
Field Summary
Fields 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
ConstructorsConstructorDescriptionIndexerBasedAggregatorNode(ReteContainer reteContainer) MUST call initializeWith() afterwards! -
Method Summary
Modifier and TypeMethodDescriptionprotected TupleaggregateAndPack(Tuple signature, Collection<Tuple> group) abstract ObjectaggregateGroup(Tuple signature, Collection<Tuple> group) Aggregates (reduces) a group of tuples.aggregateGroupAfterUpdate(Tuple signature, Collection<Tuple> currentGroup, Object oldAggregate, Direction direction, Tuple updateElement, boolean change) Aggregates (reduces) a group of tuples, having access to the previous aggregated value (before the update) and the update definition.protected voidaggregateUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change) voidassignTraceInfo(TraceInfo traceInfo) assigns new traceability info to this nodegetAggregatorOuterIdentityIndexer(int resultPositionInSignature) voidinitializeWith(ProjectionIndexer projection) voidAt the time of the invocation, the dependency graph has already been updated.protected TuplepackResult(Tuple signature, Object result) 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) Methods 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, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTagMethods inherited from interface tools.refinery.interpreter.rete.network.Supplier
getPulledContents
-
Constructor Details
-
IndexerBasedAggregatorNode
MUST call initializeWith() afterwards!
-
-
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
-
initializeWith
- Parameters:
projection- the projection indexer whose tuple groups should be aggregated
-
aggregateGroup
Aggregates (reduces) a group of tuples. The group can be null. -
aggregateGroupAfterUpdate
public Object aggregateGroupAfterUpdate(Tuple signature, Collection<Tuple> currentGroup, Object oldAggregate, Direction direction, Tuple updateElement, boolean change) Aggregates (reduces) a group of tuples, having access to the previous aggregated value (before the update) and the update definition. Defaults to aggregateGroup(). Override to increase performance.- Since:
- 2.4
-
aggregateAndPack
-
getAggregatorOuterIndexer
- Specified by:
getAggregatorOuterIndexerin interfaceIAggregatorNode
-
getAggregatorOuterIdentityIndexer
- Specified by:
getAggregatorOuterIdentityIndexerin interfaceIAggregatorNode
-
pullInto
Description copied from interface:SupplierPulls the contents of this object in this particular moment into a target collection. -
pullIntoWithTimeline
- Specified by:
pullIntoWithTimelinein interfaceSupplier
-
packResult
-
aggregateUpdate
protected void aggregateUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change) - Since:
- 2.4
-
assignTraceInfo
Description copied from interface:Nodeassigns new traceability info to this node- Specified by:
assignTraceInfoin interfaceNode- Overrides:
assignTraceInfoin classBaseNode
-