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 classNested classes/interfaces inherited from class 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 AbstractColumnAggregatorNode
aggregatorOuterIdentityIndexers, aggregatorOuterIndexer, columnMask, groupMask, NEUTRAL, operator, runtimeContext, sourceWidthFields inherited from class SingleInputNode
mailbox, parentFields inherited from class StandardNode
childMailboxes, childrenFields inherited from class BaseNode
nodeId, reteContainer, tag, traceInfos -
Constructor Summary
ConstructorsConstructorDescriptionFirstOnlyTimelyColumnAggregatorNode(ReteContainer reteContainer, IMultisetAggregationOperator<Domain, Accumulator, AggregateResult> operator, TupleMask groupMask, TupleMask columnMask) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected abstract AccumulatorgetAccumulator(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 AggregateResultprotected AggregateResultprotected AggregateResultgetResultRaw(Tuple group, Timestamp timestamp, boolean lower) protected MailboxInstantiates theMailboxof this receiver.protected voidpropagateWithChecks(Tuple group, Timestamp timestamp, AggregateResult previousOldResult, AggregateResult previousNewResult, AggregateResult currentOldResult, AggregateResult currentNewResult) protected voidstoreIfNotNeutral(Tuple group, Accumulator accumulator, AggregateResult value, Timestamp timestamp) Methods inherited from class AbstractColumnAggregatorNode
appendChild, getAggregatorOuterIdentityIndexer, getAggregatorOuterIndexer, getCommunicationTracker, propagate, propagateAggregateResultUpdate, pullInto, pullIntoWithTimeline, tupleFromAggregateResultMethods inherited from class SingleInputNode
appendParent, assignTraceInfo, getMailbox, getParents, propagatePullInto, propagatePullIntoWithTimestamp, removeParentMethods inherited from class StandardNode
constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, propagateUpdate, removeChildMethods inherited from class BaseNode
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCoreMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Node
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfos, setTagMethods inherited from interface Receiver
batchUpdate, updateMethods inherited from interface Supplier
constructIndex, getPulledContents, getPulledContents, getReceivers, removeChild
-
Field Details
-
memory
protected final Map<Tuple, TreeMap<Timestamp, FirstOnlyTimelyColumnAggregatorNode.CumulativeAggregate<Accumulator, AggregateResult>>> memory
-
-
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:SingleInputNodeInstantiates theMailboxof this receiver. Subclasses may override this method to provide their own mailbox implementation.- Overrides:
instantiateMailboxin 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:
getAggregateTuplein classAbstractColumnAggregatorNode<Domain, Accumulator, AggregateResult>
-
getAggregateResult
- Specified by:
getAggregateResultin classAbstractColumnAggregatorNode<Domain, Accumulator, AggregateResult>
-
getAggregateResultTimeline
- Specified by:
getAggregateResultTimelinein classAbstractColumnAggregatorNode<Domain, Accumulator, AggregateResult>
-
getAggregateTupleTimeline
- Specified by:
getAggregateTupleTimelinein classAbstractColumnAggregatorNode<Domain, Accumulator, AggregateResult>
-