Class ExternalInputEnumeratorNode
- 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.boundary.ExternalInputEnumeratorNode
-
- All Implemented Interfaces:
IQueryRuntimeContextListener,Disconnectable,NetworkStructureChangeSensitiveNode,Node,Receiver,Supplier
public class ExternalInputEnumeratorNode extends StandardNode implements Disconnectable, Receiver, IQueryRuntimeContextListener
An input node representing an enumerable extensional input relation and receiving external updates.Contains those tuples that are in the extensional relation identified by the input key, and also conform to the global seed (if any).
-
-
Field Summary
Fields Modifier and Type Field Description protected Mailboxmailbox-
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 ExternalInputEnumeratorNode(ReteContainer reteContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendParent(Supplier supplier)appends a parent that will continuously send insert and revoke updates to this suppliervoidconnectThroughContext(ReteEngine engine, IInputKey inputKey, Tuple globalSeed)voiddisconnect()Disconnects this rete engine component from the underlying model.TuplegetGlobalSeed()IInputKeygetInputKey()MailboxgetMailbox()Returns theMailboxof this receiver.java.util.Collection<Supplier>getParents()access active parentprotected java.lang.Iterable<Tuple>getTuplesInternal()protected MailboxinstantiateMailbox()Instantiates theMailboxof this receiver.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)voidremoveParent(Supplier supplier)removes a parentvoidupdate(IInputKey key, Tuple update, boolean isInsertion)The given tuple was inserted into or removed from the input relation indicated by the given key.voidupdate(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.network.StandardNode
appendChild, constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, propagateUpdate, removeChild
-
Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode
acceptPropagatedTraceInfo, assignTraceInfo, 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
getPulledContents
-
-
-
-
Field Detail
-
mailbox
protected final Mailbox mailbox
- Since:
- 1.6
-
-
Constructor Detail
-
ExternalInputEnumeratorNode
public ExternalInputEnumeratorNode(ReteContainer reteContainer)
-
-
Method Detail
-
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
-
connectThroughContext
public void connectThroughContext(ReteEngine engine, IInputKey inputKey, Tuple globalSeed)
-
disconnect
public void disconnect()
Description copied from interface:DisconnectableDisconnects this rete engine component from the underlying model. Disconnecting enables the garbage collection mechanisms to dispose of the rete network.- Specified by:
disconnectin interfaceDisconnectable
-
getTuplesInternal
protected java.lang.Iterable<Tuple> getTuplesInternal()
- Since:
- 2.2
-
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.
-
pullIntoWithTimeline
public void pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector, boolean flush)
- Specified by:
pullIntoWithTimelinein interfaceSupplier
-
update
public void update(IInputKey key, Tuple update, boolean isInsertion)
Description copied from interface:IQueryRuntimeContextListenerThe given tuple was inserted into or removed from the input relation indicated by the given key.- Specified by:
updatein interfaceIQueryRuntimeContextListener- Parameters:
key- the key identifying the input relation that was updatedupdate- the tuple that was inserted or removedisInsertion- true if it was an insertion, false otherwise.
-
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.
-
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
-
getInputKey
public IInputKey getInputKey()
-
getGlobalSeed
public Tuple getGlobalSeed()
-
-