Class IndexerWithMemory
java.lang.Object
tools.refinery.interpreter.rete.network.BaseNode
tools.refinery.interpreter.rete.index.StandardIndexer
tools.refinery.interpreter.rete.index.IndexerWithMemory
- All Implemented Interfaces:
Indexer
,ResumableNode
,IGroupable
,NetworkStructureChangeSensitiveNode
,Node
,Receiver
- Direct Known Subclasses:
GenericProjectionIndexer
public abstract class IndexerWithMemory
extends StandardIndexer
implements Receiver, NetworkStructureChangeSensitiveNode, ResumableNode
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommunicationGroup
protected final Mailbox
protected MaskedTupleMemory
<Timestamp> Fields inherited from class tools.refinery.interpreter.rete.index.StandardIndexer
mask, parent
Fields inherited from class tools.refinery.interpreter.rete.network.BaseNode
nodeId, reteContainer, tag, traceInfos
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendParent
(Supplier supplier) appends a parent that will continuously send insert and revoke updates to this supplierReturns theMailbox
of this receiver.access active parentReturns the smallest timestamp where lazy folding shall be resumed, or null if there is no more folding to do in this resumable.protected Mailbox
Instantiates theMailbox
of this receiver.void
At the time of the invocation, the dependency graph has already been updated.void
removeParent
(Supplier supplier) removes a parentvoid
When called, the folding of the state shall be resumed at the given timestamp.void
Sets the current group of the mailboxprotected abstract void
update
(Direction direction, Tuple updateElement, Tuple signature, boolean change, Timestamp timestamp) Refined version of updatevoid
Updates the receiver with a newly found or lost partial matching.Methods inherited from class tools.refinery.interpreter.rete.index.StandardIndexer
assignTraceInfo, attachListener, detachListener, getContainer, getListeners, getMask, getParent, propagate, toStringCore
Methods inherited from class tools.refinery.interpreter.rete.network.BaseNode
acceptPropagatedTraceInfo, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString
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.index.Indexer
get, getActiveNode, getTimeline
Methods inherited from interface tools.refinery.interpreter.rete.network.Node
acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag
Methods inherited from interface tools.refinery.interpreter.rete.network.Receiver
batchUpdate
-
Field Details
-
memory
-
logic
- Since:
- 2.3
-
mailbox
- Since:
- 1.6
-
group
- Since:
- 2.4
-
-
Constructor Details
-
IndexerWithMemory
-
-
Method Details
-
getCurrentGroup
- Specified by:
getCurrentGroup
in interfaceIGroupable
- Returns:
- the current group of the mailbox
-
setCurrentGroup
Description copied from interface:IGroupable
Sets the current group of the mailbox- Specified by:
setCurrentGroup
in interfaceIGroupable
-
networkStructureChanged
public void networkStructureChanged()Description copied from interface:NetworkStructureChangeSensitiveNode
At the time of the invocation, the dependency graph has already been updated.- Specified by:
networkStructureChanged
in interfaceNetworkStructureChangeSensitiveNode
- Overrides:
networkStructureChanged
in classStandardIndexer
-
instantiateMailbox
Instantiates theMailbox
of this receiver. Subclasses may override this method to provide their own mailbox implementation.- Returns:
- the mailbox
- Since:
- 2.0
-
getMailbox
Description copied from interface:Receiver
Returns theMailbox
of this receiver.- Specified by:
getMailbox
in interfaceReceiver
- Returns:
- the mailbox
-
getMemory
- Since:
- 2.0
-
update
Description copied from interface:Receiver
Updates the receiver with a newly found or lost partial matching. -
update
protected abstract void update(Direction direction, Tuple updateElement, Tuple signature, boolean change, Timestamp timestamp) Refined version of update- Since:
- 2.4
-
appendParent
Description copied from interface:Receiver
appends a parent that will continuously send insert and revoke updates to this supplier- Specified by:
appendParent
in interfaceReceiver
-
removeParent
Description copied from interface:Receiver
removes a parent- Specified by:
removeParent
in interfaceReceiver
-
getParents
Description copied from interface:Receiver
access active parent- Specified by:
getParents
in interfaceReceiver
- Since:
- 2.4
-
resumeAt
Description copied from interface:ResumableNode
When 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:
resumeAt
in interfaceResumableNode
- Since:
- 2.4
-
getResumableTimestamp
Description copied from interface:ResumableNode
Returns the smallest timestamp where lazy folding shall be resumed, or null if there is no more folding to do in this resumable.- Specified by:
getResumableTimestamp
in interfaceResumableNode
- Since:
- 2.4
-
createLogic
- Since:
- 2.3
-