Class BaseNode
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.rete.network.BaseNode
-
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
SimpleReceiver
,StandardIndexer
,StandardNode
public abstract class BaseNode extends java.lang.Object implements Node
Base implementation for a Rete node.
-
-
Field Summary
Fields Modifier and Type Field Description protected long
nodeId
protected ReteContainer
reteContainer
protected java.lang.Object
tag
protected java.util.Set<TraceInfo>
traceInfos
-
Constructor Summary
Constructors Constructor Description BaseNode(ReteContainer reteContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptPropagatedTraceInfo(TraceInfo traceInfo)
accepts traceability info propagated to this nodevoid
assignTraceInfo(TraceInfo traceInfo)
assigns new traceability info to this nodeReteContainer
getContainer()
long
getNodeId()
java.lang.Object
getTag()
protected java.lang.String
getTraceInfoPatternsEnumerated()
Descendants should use this in e.g.java.util.Set<TraceInfo>
getTraceInfos()
void
setTag(java.lang.Object tag)
Assigns a descriptive tag to the nodejava.lang.String
toString()
protected java.lang.String
toStringCore()
clients should override this to append before the tag / trace indicators-
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
getCommunicationTracker
-
-
-
-
Field Detail
-
reteContainer
protected ReteContainer reteContainer
-
nodeId
protected long nodeId
-
tag
protected java.lang.Object tag
-
traceInfos
protected java.util.Set<TraceInfo> traceInfos
-
-
Constructor Detail
-
BaseNode
public BaseNode(ReteContainer reteContainer)
- Parameters:
reteContainer
- the container to create this node in
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringCore
protected java.lang.String toStringCore()
clients should override this to append before the tag / trace indicators
-
getContainer
public ReteContainer getContainer()
- Specified by:
getContainer
in interfaceNode
- Returns:
- the network this node belongs to.
-
getNodeId
public long getNodeId()
-
getTag
public java.lang.Object getTag()
-
setTag
public void setTag(java.lang.Object tag)
Description copied from interface:Node
Assigns a descriptive tag to the node
-
getTraceInfos
public java.util.Set<TraceInfo> getTraceInfos()
- Specified by:
getTraceInfos
in interfaceNode
- Returns:
- unmodifiable view of the list of traceability infos assigned to this node
-
assignTraceInfo
public void assignTraceInfo(TraceInfo traceInfo)
Description copied from interface:Node
assigns new traceability info to this node- Specified by:
assignTraceInfo
in interfaceNode
-
acceptPropagatedTraceInfo
public void acceptPropagatedTraceInfo(TraceInfo traceInfo)
Description copied from interface:Node
accepts traceability info propagated to this node- Specified by:
acceptPropagatedTraceInfo
in interfaceNode
-
getTraceInfoPatternsEnumerated
protected java.lang.String getTraceInfoPatternsEnumerated()
Descendants should use this in e.g. logging
-
-