Class TimelyUniquenessEnforcerNode
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.rete.network.BaseNode
-
- org.eclipse.viatra.query.runtime.rete.network.StandardNode
-
- org.eclipse.viatra.query.runtime.rete.single.AbstractUniquenessEnforcerNode
-
- org.eclipse.viatra.query.runtime.rete.single.TimelyUniquenessEnforcerNode
-
- All Implemented Interfaces:
org.eclipse.viatra.query.runtime.rete.network.communication.timely.ResumableNode,IGroupable,NetworkStructureChangeSensitiveNode,Node,Receiver,Supplier,Tunnel
- Direct Known Subclasses:
TimelyProductionNode
public class TimelyUniquenessEnforcerNode extends AbstractUniquenessEnforcerNode implements org.eclipse.viatra.query.runtime.rete.network.communication.timely.ResumableNode
Timely uniqueness enforcer node implementation.- Since:
- 2.4
- No Extend:
- This class is not intended to be subclassed by clients.
- No Instantiate:
- This class is not intended to be instantiated by clients.
-
-
Field Summary
Fields Modifier and Type Field Description protected CommunicationGroupgroupprotected TimelyMemory<Timestamp>memory-
Fields inherited from class org.eclipse.viatra.query.runtime.rete.single.AbstractUniquenessEnforcerNode
identityMask, mailbox, memoryIdentityIndexer, memoryNullIndexer, nullMask, parents, specializedListeners, tupleWidth
-
Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.StandardNode
childMailboxes, children
-
Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode
nodeId, reteContainer, tag, traceInfos
-
-
Constructor Summary
Constructors Constructor Description TimelyUniquenessEnforcerNode(ReteContainer container, int tupleWidth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommunicationGroupgetCurrentGroup()ProjectionIndexergetIdentityIndexer()ProjectionIndexergetNullIndexer()TimestampgetResumableTimestamp()Returns the smallest timestamp where lazy folding shall be resumed, or null if there is no more folding to do in this resumable.java.util.Set<Tuple>getTuples()protected MailboxinstantiateMailbox()voidnetworkStructureChanged()At the time of the invocation, the dependency graph has already been updated.voidpullInto(java.util.Collection<Tuple> collector, boolean flush)Pulls the contents of this object in this particular moment into a target collection.voidpullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector, boolean flush)voidresumeAt(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 mailboxvoidupdate(Direction direction, Tuple update, Timestamp timestamp)Updates the receiver with a newly found or lost partial matching.-
Methods inherited from class org.eclipse.viatra.query.runtime.rete.single.AbstractUniquenessEnforcerNode
appendParent, assignTraceInfo, constructIndex, getMailbox, getParents, propagate, removeParent
-
Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.StandardNode
appendChild, getChildMailboxes, getPulledContents, getReceivers, issueError, propagateUpdate, removeChild
-
Methods inherited from class org.eclipse.viatra.query.runtime.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 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
-
Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Supplier
appendChild, getPulledContents, getPulledContents, getReceivers, removeChild
-
-
-
-
Field Detail
-
memory
protected final TimelyMemory<Timestamp> memory
-
group
protected CommunicationGroup group
- Since:
- 2.4
-
-
Constructor Detail
-
TimelyUniquenessEnforcerNode
public TimelyUniquenessEnforcerNode(ReteContainer container, int tupleWidth)
-
-
Method Detail
-
instantiateMailbox
protected Mailbox instantiateMailbox()
- Specified by:
instantiateMailboxin classAbstractUniquenessEnforcerNode
-
pullInto
public void pullInto(java.util.Collection<Tuple> collector, boolean flush)
Description copied from interface:SupplierPulls the contents of this object in this particular moment into a target collection.
-
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
-
getTuples
public java.util.Set<Tuple> getTuples()
- Specified by:
getTuplesin classAbstractUniquenessEnforcerNode
-
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
-
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
-
update
public void update(Direction direction, Tuple update, Timestamp timestamp)
Description copied from interface:ReceiverUpdates the receiver with a newly found or lost partial matching.
-
pullIntoWithTimeline
public void pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector, boolean flush)
- Specified by:
pullIntoWithTimelinein interfaceSupplier
-
getNullIndexer
public ProjectionIndexer getNullIndexer()
- Specified by:
getNullIndexerin classAbstractUniquenessEnforcerNode
-
getIdentityIndexer
public ProjectionIndexer getIdentityIndexer()
- Specified by:
getIdentityIndexerin classAbstractUniquenessEnforcerNode
-
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
-
-