Class FirstOnlyTimelyColumnAggregatorNode<Domain,Accumulator,AggregateResult>
java.lang.Object
tools.refinery.interpreter.rete.network.BaseNode
tools.refinery.interpreter.rete.network.StandardNode
tools.refinery.interpreter.rete.single.SingleInputNode
tools.refinery.interpreter.rete.aggregation.AbstractColumnAggregatorNode<Domain,Accumulator,AggregateResult>
tools.refinery.interpreter.rete.aggregation.timely.FirstOnlyTimelyColumnAggregatorNode<Domain,Accumulator,AggregateResult>
- All Implemented Interfaces:
Clearable
,IAggregatorNode
,NetworkStructureChangeSensitiveNode
,Node
,Receiver
,Supplier
,Tunnel
- Direct Known Subclasses:
FirstOnlyParallelTimelyColumnAggregatorNode
,FirstOnlySequentialTimelyColumnAggregatorNode
public abstract class FirstOnlyTimelyColumnAggregatorNode<Domain,Accumulator,AggregateResult>
extends AbstractColumnAggregatorNode<Domain,Accumulator,AggregateResult>
First-only timely implementation of the column aggregator node. Only timestamps of appearance are maintained for
tuples instead of complete timelines.
Subclasses are responsible for implementing the aggregator architecture, and they must make use of the inner class
This node supports recursive aggregation.
Subclasses are responsible for implementing the aggregator architecture, and they must make use of the inner class
FirstOnlyTimelyColumnAggregatorNode.CumulativeAggregate
.
This node supports recursive aggregation.
- Since:
- 2.4
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Nested classes/interfaces inherited from class tools.refinery.interpreter.rete.aggregation.AbstractColumnAggregatorNode
AbstractColumnAggregatorNode.AggregatorOuterIdentityIndexer, AbstractColumnAggregatorNode.AggregatorOuterIndexer, AbstractColumnAggregatorNode.NetworkStructureChangeSensitiveLogic
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map
<Tuple, TreeMap<Timestamp, FirstOnlyTimelyColumnAggregatorNode.CumulativeAggregate<Accumulator, AggregateResult>>> Fields inherited from class tools.refinery.interpreter.rete.aggregation.AbstractColumnAggregatorNode
aggregatorOuterIdentityIndexers, aggregatorOuterIndexer, columnMask, groupMask, NEUTRAL, operator, runtimeContext, sourceWidth
Fields inherited from class tools.refinery.interpreter.rete.single.SingleInputNode
mailbox, parent
Fields inherited from class tools.refinery.interpreter.rete.network.StandardNode
childMailboxes, children
Fields inherited from class tools.refinery.interpreter.rete.network.BaseNode
nodeId, reteContainer, tag, traceInfos
-
Constructor Summary
ConstructorsConstructorDescriptionFirstOnlyTimelyColumnAggregatorNode
(ReteContainer reteContainer, IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator, TupleMask groupMask, TupleMask columnMask) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
protected abstract Accumulator
getAccumulator
(Tuple group, Timestamp timestamp) Returns the aggregation architecture-specific accumulator at the specified timestamp for the given group.getAggregateResult
(Tuple group) getAggregateResultTimeline
(Tuple group) getAggregateTuple
(Tuple group) getAggregateTupleTimeline
(Tuple group) getLastResult
(Tuple group) getLastTimestamp
(Tuple group) protected AggregateResult
protected AggregateResult
protected AggregateResult
getResultRaw
(Tuple group, Timestamp timestamp, boolean lower) protected Mailbox
Instantiates theMailbox
of this receiver.protected void
propagateWithChecks
(Tuple group, Timestamp timestamp, AggregateResult previousOldResult, AggregateResult previousNewResult, AggregateResult currentOldResult, AggregateResult currentNewResult) protected void
storeIfNotNeutral
(Tuple group, Accumulator accumulator, AggregateResult value, Timestamp timestamp) Methods inherited from class tools.refinery.interpreter.rete.aggregation.AbstractColumnAggregatorNode
appendChild, getAggregatorOuterIdentityIndexer, getAggregatorOuterIndexer, getCommunicationTracker, propagate, propagateAggregateResultUpdate, pullInto, pullIntoWithTimeline, tupleFromAggregateResult
Methods inherited from class tools.refinery.interpreter.rete.single.SingleInputNode
appendParent, assignTraceInfo, getMailbox, getParents, propagatePullInto, propagatePullIntoWithTimestamp, removeParent
Methods inherited from class tools.refinery.interpreter.rete.network.StandardNode
constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, propagateUpdate, removeChild
Methods inherited from class tools.refinery.interpreter.rete.network.BaseNode
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore
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.network.Node
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfos, setTag
Methods inherited from interface tools.refinery.interpreter.rete.network.Receiver
batchUpdate, update
Methods inherited from interface tools.refinery.interpreter.rete.network.Supplier
constructIndex, getPulledContents, getPulledContents, getReceivers, removeChild
-
Field Details
-
memory
protected final Map<Tuple,TreeMap<Timestamp, memoryFirstOnlyTimelyColumnAggregatorNode.CumulativeAggregate<Accumulator, AggregateResult>>>
-
-
Constructor Details
-
FirstOnlyTimelyColumnAggregatorNode
public FirstOnlyTimelyColumnAggregatorNode(ReteContainer reteContainer, IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator, TupleMask groupMask, TupleMask columnMask)
-
-
Method Details
-
getGroups
-
getLastResult
-
getLastTimestamp
-
instantiateMailbox
Description copied from class:SingleInputNode
Instantiates theMailbox
of this receiver. Subclasses may override this method to provide their own mailbox implementation.- Overrides:
instantiateMailbox
in classSingleInputNode
- Returns:
- the mailbox
-
clear
public void clear() -
propagateWithChecks
protected void propagateWithChecks(Tuple group, Timestamp timestamp, AggregateResult previousOldResult, AggregateResult previousNewResult, AggregateResult currentOldResult, AggregateResult currentNewResult) -
getAccumulator
Returns the aggregation architecture-specific accumulator at the specified timestamp for the given group. -
getResultRaw
-
getResult
-
getResult
-
storeIfNotNeutral
protected void storeIfNotNeutral(Tuple group, Accumulator accumulator, AggregateResult value, Timestamp timestamp) -
getAggregateTuple
- Specified by:
getAggregateTuple
in classAbstractColumnAggregatorNode<Domain,
Accumulator, AggregateResult>
-
getAggregateResult
- Specified by:
getAggregateResult
in classAbstractColumnAggregatorNode<Domain,
Accumulator, AggregateResult>
-
getAggregateResultTimeline
- Specified by:
getAggregateResultTimeline
in classAbstractColumnAggregatorNode<Domain,
Accumulator, AggregateResult>
-
getAggregateTupleTimeline
- Specified by:
getAggregateTupleTimeline
in classAbstractColumnAggregatorNode<Domain,
Accumulator, AggregateResult>
-