public class UniquenessEnforcerNode extends StandardNode implements Tunnel, RederivableNode, PosetAwareReceiver
IPosetComparator
to identify monotone changes; thus, ensuring that a fix-point can be reached
during the evaluation.Modifier and Type | Field and Description |
---|---|
protected TupleMask |
coreMask
OPTIONAL ELEMENT - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLE
|
protected CommunicationGroup |
currentGroup |
protected boolean |
deleteRederiveEvaluation |
protected Mailbox |
mailbox |
protected IMultiset<Tuple> |
memory |
protected MemoryIdentityIndexer |
memoryIdentityIndexer |
protected MemoryNullIndexer |
memoryNullIndexer |
protected java.util.Collection<Supplier> |
parents |
protected IPosetComparator |
posetComparator
OPTIONAL ELEMENTS - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLE
|
protected TupleMask |
posetMask
OPTIONAL ELEMENTS - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLE
|
protected IMultiset<Tuple> |
rederivableMemory |
protected java.util.List<SpecializedProjectionIndexer.ListenerSubscription> |
specializedListeners |
protected int |
tupleWidth |
children
communicationTracker, nodeId, reteContainer, tag, traceInfos
Constructor and Description |
---|
UniquenessEnforcerNode(ReteContainer reteContainer,
int tupleWidth) |
UniquenessEnforcerNode(ReteContainer reteContainer,
int tupleWidth,
boolean deleteRederiveEvaluation) |
UniquenessEnforcerNode(ReteContainer reteContainer,
int tupleWidth,
boolean deleteRederiveEvaluation,
TupleMask coreMask,
TupleMask posetMask,
IPosetComparator posetComparator) |
Modifier and Type | Method and Description |
---|---|
void |
appendParent(Supplier supplier)
appends a parent that will continously send insert and revoke updates to this supplier
|
void |
assignTraceInfo(TraceInfo traceInfo)
assigns new traceability info to this node
|
ProjectionIndexer |
constructIndex(TupleMask mask,
TraceInfo... traces)
Instantiates (or reuses, depending on implementation) an index according to the given mask.
|
TupleMask |
getCoreMask() |
CommunicationGroup |
getCurrentGroup() |
MemoryIdentityIndexer |
getIdentityIndexer() |
Mailbox |
getMailbox()
Returns the
Mailbox of this receiver. |
IMultiset<Tuple> |
getMemory() |
MemoryNullIndexer |
getNullIndexer() |
java.util.Collection<Supplier> |
getParents()
access active parent
|
IPosetComparator |
getPosetComparator() |
TupleMask |
getPosetMask() |
protected Mailbox |
instantiateMailbox() |
boolean |
isInDRedMode()
Returns true if this node actually runs in DRed mode (not necessarily).
|
protected void |
propagate(Direction direction,
Tuple update) |
void |
pullInto(java.util.Collection<Tuple> collector)
pulls the contents of this object in this particular moment into a target collection
|
void |
rederiveOne()
The method is called by the
ReteContainer to re-derive tuples after the normal messages have been
delivered and consumed. |
void |
removeParent(Supplier supplier)
removes a parent
|
void |
setCurrentGroup(CommunicationGroup currentGroup)
Sets the current group of the mailbox
|
void |
update(Direction direction,
Tuple update)
updates the receiver with a newly found or lost partial matching
|
void |
update(Direction direction,
Tuple update,
boolean monotone)
Updates the receiver with a newly found or lost partial matching also providing information
whether the update is a monotone change or not.
|
protected boolean |
updateDefault(Direction direction,
Tuple update) |
protected boolean |
updateWithDeleteAndRederive(Direction direction,
Tuple update,
boolean monotone) |
appendChild, getPulledContents, getReceivers, issueError, propagateUpdate, removeChild
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendChild, getPulledContents, getReceivers, removeChild
protected java.util.Collection<Supplier> parents
protected boolean deleteRederiveEvaluation
protected MemoryNullIndexer memoryNullIndexer
protected MemoryIdentityIndexer memoryIdentityIndexer
protected final int tupleWidth
protected final Mailbox mailbox
protected final java.util.List<SpecializedProjectionIndexer.ListenerSubscription> specializedListeners
protected CommunicationGroup currentGroup
protected final TupleMask coreMask
protected final TupleMask posetMask
protected final IPosetComparator posetComparator
public UniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth)
public UniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth, boolean deleteRederiveEvaluation)
public UniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth, boolean deleteRederiveEvaluation, TupleMask coreMask, TupleMask posetMask, IPosetComparator posetComparator)
public boolean isInDRedMode()
RederivableNode
isInDRedMode
in interface RederivableNode
public TupleMask getCoreMask()
getCoreMask
in interface PosetAwareReceiver
public TupleMask getPosetMask()
getPosetMask
in interface PosetAwareReceiver
public IPosetComparator getPosetComparator()
getPosetComparator
in interface PosetAwareReceiver
protected Mailbox instantiateMailbox()
public Mailbox getMailbox()
Receiver
Mailbox
of this receiver.getMailbox
in interface Receiver
public void update(Direction direction, Tuple update)
Receiver
public void update(Direction direction, Tuple update, boolean monotone)
PosetAwareReceiver
update
in interface PosetAwareReceiver
direction
- the direction of the updateupdate
- the update tuplemonotone
- true if the update is monotone, false otherwiseprotected boolean updateWithDeleteAndRederive(Direction direction, Tuple update, boolean monotone)
public void rederiveOne()
RederivableNode
ReteContainer
to re-derive tuples after the normal messages have been
delivered and consumed. The re-derivation process may trigger the creation and delivery of further messages
and further re-derivation rounds.rederiveOne
in interface RederivableNode
public ProjectionIndexer constructIndex(TupleMask mask, TraceInfo... traces)
Supplier
constructIndex
in interface Supplier
constructIndex
in class StandardNode
public void pullInto(java.util.Collection<Tuple> collector)
Supplier
public MemoryNullIndexer getNullIndexer()
public MemoryIdentityIndexer getIdentityIndexer()
public void appendParent(Supplier supplier)
Receiver
appendParent
in interface Receiver
public void removeParent(Supplier supplier)
Receiver
removeParent
in interface Receiver
public java.util.Collection<Supplier> getParents()
Receiver
getParents
in interface Receiver
public void assignTraceInfo(TraceInfo traceInfo)
Node
assignTraceInfo
in interface Node
assignTraceInfo
in class BaseNode
public CommunicationGroup getCurrentGroup()
getCurrentGroup
in interface IGroupable
public void setCurrentGroup(CommunicationGroup currentGroup)
IGroupable
setCurrentGroup
in interface IGroupable