Class AbstractUniquenessEnforcerNode
- 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
-
- All Implemented Interfaces:
NetworkStructureChangeSensitiveNode
,Node
,Receiver
,Supplier
,Tunnel
- Direct Known Subclasses:
TimelyUniquenessEnforcerNode
,UniquenessEnforcerNode
public abstract class AbstractUniquenessEnforcerNode extends StandardNode implements Tunnel
Ensures that no identical copies get to the output. Only one replica of each pattern substitution may traverse this node. There are both timeless and timely implementations.- Since:
- 2.2
- 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 TupleMask
identityMask
protected Mailbox
mailbox
protected ProjectionIndexer
memoryIdentityIndexer
protected ProjectionIndexer
memoryNullIndexer
protected TupleMask
nullMask
protected java.util.Collection<Supplier>
parents
protected java.util.List<SpecializedProjectionIndexer.ListenerSubscription>
specializedListeners
protected int
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 AbstractUniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
appendParent(Supplier supplier)
appends a parent that will continuously send insert and revoke updates to this suppliervoid
assignTraceInfo(TraceInfo traceInfo)
assigns new traceability info to this nodeProjectionIndexer
constructIndex(TupleMask mask, TraceInfo... traces)
Instantiates (or reuses, depending on implementation) an index according to the given mask.abstract ProjectionIndexer
getIdentityIndexer()
Mailbox
getMailbox()
Returns theMailbox
of this receiver.abstract ProjectionIndexer
getNullIndexer()
java.util.Collection<Supplier>
getParents()
access active parentabstract java.util.Set<Tuple>
getTuples()
protected abstract Mailbox
instantiateMailbox()
protected void
propagate(Direction direction, Tuple update, Timestamp timestamp)
void
removeParent(Supplier supplier)
removes a parent-
Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.StandardNode
appendChild, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, 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, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag
-
Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Receiver
batchUpdate, update
-
Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Supplier
appendChild, getPulledContents, getPulledContents, getReceivers, pullInto, pullIntoWithTimeline, removeChild
-
-
-
-
Field Detail
-
parents
protected final java.util.Collection<Supplier> parents
-
memoryNullIndexer
protected ProjectionIndexer memoryNullIndexer
-
memoryIdentityIndexer
protected ProjectionIndexer memoryIdentityIndexer
-
tupleWidth
protected final int tupleWidth
-
mailbox
protected Mailbox mailbox
-
nullMask
protected final TupleMask nullMask
-
identityMask
protected final TupleMask identityMask
-
specializedListeners
protected final java.util.List<SpecializedProjectionIndexer.ListenerSubscription> specializedListeners
-
-
Constructor Detail
-
AbstractUniquenessEnforcerNode
public AbstractUniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth)
-
-
Method Detail
-
instantiateMailbox
protected abstract Mailbox instantiateMailbox()
-
getMailbox
public Mailbox getMailbox()
Description copied from interface:Receiver
Returns theMailbox
of this receiver.- Specified by:
getMailbox
in interfaceReceiver
- Returns:
- the mailbox
-
getTuples
public abstract java.util.Set<Tuple> getTuples()
- Since:
- 2.8
-
propagate
protected void propagate(Direction direction, Tuple update, Timestamp timestamp)
- Since:
- 2.4
-
constructIndex
public ProjectionIndexer constructIndex(TupleMask mask, TraceInfo... traces)
Description copied from interface:Supplier
Instantiates (or reuses, depending on implementation) an index according to the given mask. Intended for internal use; clients should invoke through Library instead to enable reusing.- Specified by:
constructIndex
in interfaceSupplier
- Overrides:
constructIndex
in classStandardNode
-
getNullIndexer
public abstract ProjectionIndexer getNullIndexer()
-
getIdentityIndexer
public abstract ProjectionIndexer getIdentityIndexer()
-
appendParent
public void appendParent(Supplier supplier)
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
public void removeParent(Supplier supplier)
Description copied from interface:Receiver
removes a parent- Specified by:
removeParent
in interfaceReceiver
-
getParents
public java.util.Collection<Supplier> getParents()
Description copied from interface:Receiver
access active parent- Specified by:
getParents
in interfaceReceiver
-
assignTraceInfo
public void assignTraceInfo(TraceInfo traceInfo)
Description copied from interface:Node
assigns new traceability info to this node- Specified by:
assignTraceInfo
in interfaceNode
- Overrides:
assignTraceInfo
in classBaseNode
-
-