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 TupleMaskidentityMaskprotected Mailboxmailboxprotected ProjectionIndexermemoryIdentityIndexerprotected ProjectionIndexermemoryNullIndexerprotected TupleMasknullMaskprotected java.util.Collection<Supplier>parentsprotected java.util.List<SpecializedProjectionIndexer.ListenerSubscription>specializedListenersprotected inttupleWidth-
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 voidappendParent(Supplier supplier)appends a parent that will continuously send insert and revoke updates to this suppliervoidassignTraceInfo(TraceInfo traceInfo)assigns new traceability info to this nodeProjectionIndexerconstructIndex(TupleMask mask, TraceInfo... traces)Instantiates (or reuses, depending on implementation) an index according to the given mask.abstract ProjectionIndexergetIdentityIndexer()MailboxgetMailbox()Returns theMailboxof this receiver.abstract ProjectionIndexergetNullIndexer()java.util.Collection<Supplier>getParents()access active parentabstract java.util.Set<Tuple>getTuples()protected abstract MailboxinstantiateMailbox()protected voidpropagate(Direction direction, Tuple update, Timestamp timestamp)voidremoveParent(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:ReceiverReturns theMailboxof this receiver.- Specified by:
getMailboxin 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:SupplierInstantiates (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:
constructIndexin interfaceSupplier- Overrides:
constructIndexin classStandardNode
-
getNullIndexer
public abstract ProjectionIndexer getNullIndexer()
-
getIdentityIndexer
public abstract ProjectionIndexer getIdentityIndexer()
-
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
-
assignTraceInfo
public void assignTraceInfo(TraceInfo traceInfo)
Description copied from interface:Nodeassigns new traceability info to this node- Specified by:
assignTraceInfoin interfaceNode- Overrides:
assignTraceInfoin classBaseNode
-
-