Class IndexerWithMemory
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.rete.network.BaseNode
-
- org.eclipse.viatra.query.runtime.rete.index.StandardIndexer
-
- org.eclipse.viatra.query.runtime.rete.index.IndexerWithMemory
-
- All Implemented Interfaces:
Indexer,org.eclipse.viatra.query.runtime.rete.network.communication.timely.ResumableNode,IGroupable,NetworkStructureChangeSensitiveNode,Node,Receiver
- Direct Known Subclasses:
GenericProjectionIndexer
public abstract class IndexerWithMemory extends StandardIndexer implements Receiver, NetworkStructureChangeSensitiveNode, org.eclipse.viatra.query.runtime.rete.network.communication.timely.ResumableNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classIndexerWithMemory.NetworkStructureChangeSensitiveLogic
-
Field Summary
Fields Modifier and Type Field Description protected CommunicationGroupgroupprotected IndexerWithMemory.NetworkStructureChangeSensitiveLogiclogicprotected Mailboxmailboxprotected MaskedTupleMemory<Timestamp>memory-
Fields inherited from class org.eclipse.viatra.query.runtime.rete.index.StandardIndexer
mask, parent
-
Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode
nodeId, reteContainer, tag, traceInfos
-
-
Constructor Summary
Constructors Constructor Description IndexerWithMemory(ReteContainer reteContainer, TupleMask mask)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidappendParent(Supplier supplier)appends a parent that will continuously send insert and revoke updates to this supplierprotected IndexerWithMemory.NetworkStructureChangeSensitiveLogiccreateLogic()CommunicationGroupgetCurrentGroup()MailboxgetMailbox()Returns theMailboxof this receiver.MaskedTupleMemory<Timestamp>getMemory()java.util.Collection<Supplier>getParents()access active parentTimestampgetResumableTimestamp()Returns the smallest timestamp where lazy folding shall be resumed, or null if there is no more folding to do in this resumable.protected MailboxinstantiateMailbox()Instantiates theMailboxof this receiver.voidnetworkStructureChanged()At the time of the invocation, the dependency graph has already been updated.voidremoveParent(Supplier supplier)removes a parentvoidresumeAt(Timestamp timestamp)When called, the folding of the state shall be resumed at the given timestamp.voidsetCurrentGroup(CommunicationGroup group)Sets the current group of the mailboxprotected abstract voidupdate(Direction direction, Tuple updateElement, Tuple signature, boolean change, Timestamp timestamp)Refined version of updatevoidupdate(Direction direction, Tuple updateElement, Timestamp timestamp)Updates the receiver with a newly found or lost partial matching.-
Methods inherited from class org.eclipse.viatra.query.runtime.rete.index.StandardIndexer
assignTraceInfo, attachListener, detachListener, getContainer, getListeners, getMask, getParent, propagate, toStringCore
-
Methods inherited from class org.eclipse.viatra.query.runtime.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 org.eclipse.viatra.query.runtime.rete.index.Indexer
get, getActiveNode, getTimeline
-
Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Node
acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag
-
Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Receiver
batchUpdate
-
-
-
-
Field Detail
-
memory
protected MaskedTupleMemory<Timestamp> memory
-
logic
protected IndexerWithMemory.NetworkStructureChangeSensitiveLogic logic
- Since:
- 2.3
-
mailbox
protected final Mailbox mailbox
- Since:
- 1.6
-
group
protected CommunicationGroup group
- Since:
- 2.4
-
-
Constructor Detail
-
IndexerWithMemory
public IndexerWithMemory(ReteContainer reteContainer, TupleMask mask)
-
-
Method Detail
-
getCurrentGroup
public CommunicationGroup getCurrentGroup()
- Specified by:
getCurrentGroupin interfaceIGroupable- Returns:
- the current group of the mailbox
-
setCurrentGroup
public void setCurrentGroup(CommunicationGroup group)
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 classStandardIndexer
-
instantiateMailbox
protected Mailbox instantiateMailbox()
Instantiates theMailboxof this receiver. Subclasses may override this method to provide their own mailbox implementation.- Returns:
- the mailbox
- Since:
- 2.0
-
getMailbox
public Mailbox getMailbox()
Description copied from interface:ReceiverReturns theMailboxof this receiver.- Specified by:
getMailboxin interfaceReceiver- Returns:
- the mailbox
-
getMemory
public MaskedTupleMemory<Timestamp> getMemory()
- Since:
- 2.0
-
update
public void update(Direction direction, Tuple updateElement, Timestamp timestamp)
Description copied from interface:ReceiverUpdates 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
public void appendParent(Supplier supplier)
Description copied from interface:Receiverappends a parent that will continuously send insert and revoke updates to this supplier- Specified by:
appendParentin interfaceReceiver
-
removeParent
public void removeParent(Supplier supplier)
Description copied from interface:Receiverremoves a parent- Specified by:
removeParentin interfaceReceiver
-
getParents
public java.util.Collection<Supplier> getParents()
Description copied from interface:Receiveraccess active parent- Specified by:
getParentsin interfaceReceiver- Since:
- 2.4
-
resumeAt
public void resumeAt(Timestamp timestamp)
Description copied from interface:org.eclipse.viatra.query.runtime.rete.network.communication.timely.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 interfaceorg.eclipse.viatra.query.runtime.rete.network.communication.timely.ResumableNode- Since:
- 2.4
-
getResumableTimestamp
public Timestamp getResumableTimestamp()
Description copied from interface:org.eclipse.viatra.query.runtime.rete.network.communication.timely.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 interfaceorg.eclipse.viatra.query.runtime.rete.network.communication.timely.ResumableNode- Since:
- 2.4
-
createLogic
protected IndexerWithMemory.NetworkStructureChangeSensitiveLogic createLogic()
- Since:
- 2.3
-
-