public class UniquenessEnforcerNode extends StandardNode implements Tunnel, RederivableNode, MonotonicityAwareReceiver
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 |
childrencommunicationTracker, 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() |
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, removeChildacceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCoreclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendChild, getPulledContents, getReceivers, removeChildprotected 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 TupleMask getCoreMask()
getCoreMask in interface MonotonicityAwareReceiverpublic TupleMask getPosetMask()
getPosetMask in interface MonotonicityAwareReceiverpublic IPosetComparator getPosetComparator()
getPosetComparator in interface MonotonicityAwareReceiverprotected Mailbox instantiateMailbox()
public Mailbox getMailbox()
ReceiverMailbox of this receiver.getMailbox in interface Receiverpublic void update(Direction direction, Tuple update)
Receiverpublic void update(Direction direction, Tuple update, boolean monotone)
MonotonicityAwareReceiverupdate in interface MonotonicityAwareReceiverdirection - 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()
RederivableNodeReteContainer 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 RederivableNodepublic ProjectionIndexer constructIndex(TupleMask mask, TraceInfo... traces)
SupplierconstructIndex in interface SupplierconstructIndex in class StandardNodepublic void pullInto(java.util.Collection<Tuple> collector)
Supplierpublic MemoryNullIndexer getNullIndexer()
public MemoryIdentityIndexer getIdentityIndexer()
public void appendParent(Supplier supplier)
ReceiverappendParent in interface Receiverpublic void removeParent(Supplier supplier)
ReceiverremoveParent in interface Receiverpublic java.util.Collection<Supplier> getParents()
ReceivergetParents in interface Receiverpublic void assignTraceInfo(TraceInfo traceInfo)
NodeassignTraceInfo in interface NodeassignTraceInfo in class BaseNodepublic CommunicationGroup getCurrentGroup()
getCurrentGroup in interface IGroupablepublic void setCurrentGroup(CommunicationGroup currentGroup)
IGroupablesetCurrentGroup in interface IGroupable