public abstract class AbstractColumnAggregatorNode<Domain,Accumulator,AggregateResult> extends SingleInputNode implements Clearable, IAggregatorNode
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractColumnAggregatorNode.AggregatorOuterIdentityIndexer
A special non-iterable index that checks a suspected aggregate value for a given signature.
|
protected class |
AbstractColumnAggregatorNode.AggregatorOuterIndexer
A special non-iterable index that retrieves the aggregated, packed result (signature+aggregate) for the original
signature.
|
Modifier and Type | Field and Description |
---|---|
protected AbstractColumnAggregatorNode.AggregatorOuterIdentityIndexer[] |
aggregatorOuterIdentityIndexers |
protected AbstractColumnAggregatorNode.AggregatorOuterIndexer |
aggregatorOuterIndexer |
protected TupleMask |
columnMask |
protected TupleMask |
groupMask |
protected AggregateResult |
NEUTRAL |
protected IMultisetAggregationOperator<Domain,Accumulator,AggregateResult> |
operator |
protected IQueryRuntimeContext |
runtimeContext |
protected int |
sourceWidth |
mailbox, parent
childMailboxes, children
nodeId, reteContainer, tag, traceInfos
Constructor and Description |
---|
AbstractColumnAggregatorNode(ReteContainer reteContainer,
IMultisetAggregationOperator<Domain,Accumulator,AggregateResult> operator,
TupleMask groupMask,
int aggregatedColumn)
Creates a new column aggregator node.
|
AbstractColumnAggregatorNode(ReteContainer reteContainer,
IMultisetAggregationOperator<Domain,Accumulator,AggregateResult> operator,
TupleMask groupMask,
TupleMask columnMask)
Creates a new column aggregator node.
|
Modifier and Type | Method and Description |
---|---|
void |
appendChild(Receiver receiver)
appends a receiver that will continously receive insert and revoke updates from this supplier
|
abstract AggregateResult |
getAggregateResult(Tuple key) |
abstract Tuple |
getAggregateTuple(Tuple key) |
Indexer |
getAggregatorOuterIdentityIndexer(int resultPositionInSignature) |
Indexer |
getAggregatorOuterIndexer() |
CommunicationTracker |
getCommunicationTracker() |
void |
propagate(Tuple group,
AggregateResult oldValue,
AggregateResult newValue,
Timestamp timestamp) |
void |
pullInto(java.util.Collection<Tuple> collector,
boolean flush)
Pulls the contents of this object in this particular moment into a target collection.
|
void |
pullIntoWithTimestamp(java.util.Map<Tuple,Timestamp> collector,
boolean flush) |
protected Tuple |
tupleFromAggregateResult(Tuple groupTuple,
AggregateResult aggregateResult) |
appendParent, assignTraceInfo, getMailbox, getParents, instantiateMailbox, propagatePullInto, propagatePullIntoWithTimestamp, removeParent
constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, propagateUpdate, removeChild
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
constructIndex, getPulledContents, getPulledContents, getReceivers, removeChild
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfos, setTag
protected final IMultisetAggregationOperator<Domain,Accumulator,AggregateResult> operator
protected final TupleMask groupMask
protected final TupleMask columnMask
protected final int sourceWidth
protected final IQueryRuntimeContext runtimeContext
protected final AggregateResult NEUTRAL
protected AbstractColumnAggregatorNode.AggregatorOuterIndexer aggregatorOuterIndexer
protected AbstractColumnAggregatorNode.AggregatorOuterIdentityIndexer[] aggregatorOuterIdentityIndexers
public AbstractColumnAggregatorNode(ReteContainer reteContainer, IMultisetAggregationOperator<Domain,Accumulator,AggregateResult> operator, TupleMask groupMask, TupleMask columnMask)
reteContainer
- the RETE container of the nodeoperator
- the aggregation operatordeleteRederiveEvaluation
- true if the node should run in DRED mode, false otherwisegroupMask
- the mask that masks a tuple to obtain the key that we are grouping-bycolumnMask
- the mask that masks a tuple to obtain the tuple element(s) that we are aggregating overposetComparator
- the poset comparator for the column, if known, otherwise it can be nullpublic AbstractColumnAggregatorNode(ReteContainer reteContainer, IMultisetAggregationOperator<Domain,Accumulator,AggregateResult> operator, TupleMask groupMask, int aggregatedColumn)
reteContainer
- the RETE container of the nodeoperator
- the aggregation operatorgroupMask
- the mask that masks a tuple to obtain the key that we are grouping-byaggregatedColumn
- the index of the column that the aggregator node is aggregating overpublic CommunicationTracker getCommunicationTracker()
getCommunicationTracker
in interface Node
getCommunicationTracker
in class SingleInputNode
public void pullInto(java.util.Collection<Tuple> collector, boolean flush)
Supplier
public void pullIntoWithTimestamp(java.util.Map<Tuple,Timestamp> collector, boolean flush)
pullIntoWithTimestamp
in interface Supplier
public void appendChild(Receiver receiver)
Supplier
appendChild
in interface Supplier
appendChild
in class StandardNode
public Indexer getAggregatorOuterIndexer()
getAggregatorOuterIndexer
in interface IAggregatorNode
public Indexer getAggregatorOuterIdentityIndexer(int resultPositionInSignature)
getAggregatorOuterIdentityIndexer
in interface IAggregatorNode
public void propagate(Tuple group, AggregateResult oldValue, AggregateResult newValue, Timestamp timestamp)
public abstract AggregateResult getAggregateResult(Tuple key)
protected Tuple tupleFromAggregateResult(Tuple groupTuple, AggregateResult aggregateResult)