public class UniquenessEnforcerNode extends AbstractUniquenessEnforcerNode implements RederivableNode, PosetAwareReceiver
The node is capable of operating in the delete and re-derive mode. In this mode, it is also possible to equip the
node with an 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 IMultiset<Tuple> |
memory |
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 |
identityMask, mailbox, memoryIdentityIndexer, memoryNullIndexer, nullMask, parents, specializedListeners, tupleWidth
childMailboxes, children
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 |
---|---|
TupleMask |
getCoreMask() |
CommunicationGroup |
getCurrentGroup() |
ProjectionIndexer |
getIdentityIndexer() |
ProjectionIndexer |
getNullIndexer() |
IPosetComparator |
getPosetComparator() |
TupleMask |
getPosetMask() |
java.util.Set<Tuple> |
getTuples() |
protected Mailbox |
instantiateMailbox() |
boolean |
isInDRedMode()
Returns true if this node actually runs in DRed mode (not necessarily).
|
void |
pullInto(java.util.Collection<Tuple> collector,
boolean flush)
Pulls the contents of this object in this particular moment into a target collection.
|
void |
pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector,
boolean flush) |
void |
rederiveOne()
The method is called by the
ReteContainer to re-derive tuples after the normal messages have been
delivered and consumed. |
void |
setCurrentGroup(CommunicationGroup currentGroup)
Sets the current group of the mailbox
|
void |
update(Direction direction,
Tuple update,
Timestamp timestamp)
Updates the receiver with a newly found or lost partial matching.
|
protected boolean |
updateDefault(Direction direction,
Tuple update) |
protected boolean |
updateWithDeleteAndRederive(Direction direction,
Tuple update,
boolean monotone) |
void |
updateWithPosetInfo(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.
|
appendParent, assignTraceInfo, constructIndex, getMailbox, getParents, propagate, removeParent
appendChild, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, propagateUpdate, removeChild
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendParent, batchUpdate, getMailbox, getParents, removeParent
acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTag
appendChild, getPulledContents, getPulledContents, getReceivers, removeChild
protected boolean deleteRederiveEvaluation
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 void pullInto(java.util.Collection<Tuple> collector, boolean flush)
Supplier
public java.util.Set<Tuple> getTuples()
getTuples
in class AbstractUniquenessEnforcerNode
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
public void pullIntoWithTimeline(java.util.Map<Tuple,Timeline<Timestamp>> collector, boolean flush)
pullIntoWithTimeline
in interface Supplier
protected Mailbox instantiateMailbox()
instantiateMailbox
in class AbstractUniquenessEnforcerNode
public void update(Direction direction, Tuple update, Timestamp timestamp)
Receiver
public void updateWithPosetInfo(Direction direction, Tuple update, boolean monotone)
PosetAwareReceiver
updateWithPosetInfo
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 getNullIndexer()
getNullIndexer
in class AbstractUniquenessEnforcerNode
public ProjectionIndexer getIdentityIndexer()
getIdentityIndexer
in class AbstractUniquenessEnforcerNode
public CommunicationGroup getCurrentGroup()
getCurrentGroup
in interface IGroupable
public void setCurrentGroup(CommunicationGroup currentGroup)
IGroupable
setCurrentGroup
in interface IGroupable