Class OutputCachingEvaluatorNode
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.eval.AbstractEvaluatorNode
tools.refinery.interpreter.rete.eval.OutputCachingEvaluatorNode
- All Implemented Interfaces:
Clearable,IEvaluatorNode,ResumableNode,IGroupable,NetworkStructureChangeSensitiveNode,Node,Receiver,Supplier,Tunnel
public class OutputCachingEvaluatorNode
extends AbstractEvaluatorNode
implements Clearable, ResumableNode
An evaluator node that caches the evaluation result. This node is also capable of caching the timestamps associated
with the result tuples if it is used in recursive differential dataflow evaluation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommunicationGroupprotected TimelyMemory<Timestamp> Maps input tuples to timestamps.Fields inherited from class tools.refinery.interpreter.rete.eval.AbstractEvaluatorNode
coreFields inherited from class tools.refinery.interpreter.rete.single.SingleInputNode
mailbox, parentFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Returns the smallest timestamp where lazy folding shall be resumed, or null if there is no more folding to do in this resumable.voidAt the time of the invocation, the dependency graph has already been updated.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) voidWhen called, the folding of the state shall be resumed at the given timestamp.voidSets the current group of the mailboxvoidUpdates the receiver with a newly found or lost partial matching.Methods inherited from class tools.refinery.interpreter.rete.eval.AbstractEvaluatorNode
getReteContainer, prettyPrintTraceInfoPatternList, propagateIterableUpdateMethods inherited from class tools.refinery.interpreter.rete.single.SingleInputNode
appendParent, assignTraceInfo, getCommunicationTracker, getMailbox, getParents, instantiateMailbox, propagatePullInto, propagatePullIntoWithTimestamp, removeParentMethods 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, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTagMethods inherited from interface tools.refinery.interpreter.rete.network.Receiver
batchUpdateMethods inherited from interface tools.refinery.interpreter.rete.network.Supplier
appendChild, constructIndex, getPulledContents, getPulledContents, getReceivers, removeChild
-
Field Details
-
logic
- Since:
- 2.3
-
outputCache
- Since:
- 2.4
-
memory
Maps input tuples to timestamps. It is wrong to map evaluation result to timestamps because the different input tuples may yield the same evaluation result. This field is null as long as this node is in a non-recursive group.- Since:
- 2.4
-
group
- Since:
- 2.4
-
-
Constructor Details
-
OutputCachingEvaluatorNode
- Since:
- 1.5
-
-
Method Details
-
getCurrentGroup
- Specified by:
getCurrentGroupin interfaceIGroupable- Returns:
- the current group of the mailbox
-
setCurrentGroup
Description copied from interface:IGroupableSets the current group of the mailbox- Specified by:
setCurrentGroupin interfaceIGroupable
-
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
-
clear
public void clear() -
createLogic
- Since:
- 2.3
-
pullInto
Description copied from interface:SupplierPulls the contents of this object in this particular moment into a target collection. -
pullIntoWithTimeline
- Specified by:
pullIntoWithTimelinein interfaceSupplier
-
update
Description copied from interface:ReceiverUpdates the receiver with a newly found or lost partial matching. -
getResumableTimestamp
Description copied from interface:ResumableNodeReturns the smallest timestamp where lazy folding shall be resumed, or null if there is no more folding to do in this resumable.- Specified by:
getResumableTimestampin interfaceResumableNode- Since:
- 2.4
-
resumeAt
Description copied from interface:ResumableNodeWhen called, the folding of the state shall be resumed at the given timestamp. The resumable is expected to do a folding step at the given timestamp only. Afterwards, folding shall be interrupted, even if there is more folding to do towards higher timestamps.- Specified by:
resumeAtin interfaceResumableNode- Since:
- 2.4
-