Class UniquenessEnforcerNode
java.lang.Object
tools.refinery.interpreter.rete.network.BaseNode
tools.refinery.interpreter.rete.network.StandardNode
tools.refinery.interpreter.rete.single.AbstractUniquenessEnforcerNode
tools.refinery.interpreter.rete.single.UniquenessEnforcerNode
- All Implemented Interfaces:
IGroupable,NetworkStructureChangeSensitiveNode,Node,PosetAwareReceiver,Receiver,RederivableNode,Supplier,Tunnel
- Direct Known Subclasses:
DefaultProductionNode
public class UniquenessEnforcerNode
extends AbstractUniquenessEnforcerNode
implements RederivableNode, PosetAwareReceiver
Timeless uniqueness enforcer node implementation.
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TupleMaskOPTIONAL ELEMENT - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLEprotected CommunicationGroupprotected booleanprotected final IPosetComparatorOPTIONAL ELEMENTS - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLEprotected final TupleMaskOPTIONAL ELEMENTS - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLEFields inherited from class tools.refinery.interpreter.rete.single.AbstractUniquenessEnforcerNode
identityMask, mailbox, memoryIdentityIndexer, memoryNullIndexer, nullMask, parents, specializedListeners, tupleWidthFields inherited from class tools.refinery.interpreter.rete.network.StandardNode
childMailboxes, childrenFields inherited from class tools.refinery.interpreter.rete.network.BaseNode
nodeId, reteContainer, tag, traceInfos -
Constructor Summary
ConstructorsConstructorDescriptionUniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth) UniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth, boolean deleteRederiveEvaluation) UniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth, boolean deleteRederiveEvaluation, TupleMask coreMask, TupleMask posetMask, IPosetComparator posetComparator) -
Method Summary
Modifier and TypeMethodDescriptionprotected MailboxbooleanReturns true if this node actually runs in DRed mode (not necessarily).voidpullInto(Collection<Tuple> collector, boolean flush) Pulls the contents of this object in this particular moment into a target collection.voidpullIntoWithTimeline(Map<Tuple, Timeline<Timestamp>> collector, boolean flush) voidThe method is called by theReteContainerto re-derive tuples after the normal messages have been delivered and consumed.voidsetCurrentGroup(CommunicationGroup currentGroup) Sets the current group of the mailboxvoidUpdates the receiver with a newly found or lost partial matching.protected booleanupdateDefault(Direction direction, Tuple update) protected booleanupdateWithDeleteAndRederive(Direction direction, Tuple update, boolean monotone) voidupdateWithPosetInfo(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.Methods inherited from class tools.refinery.interpreter.rete.single.AbstractUniquenessEnforcerNode
appendParent, assignTraceInfo, constructIndex, getMailbox, getParents, propagate, removeParentMethods inherited from class tools.refinery.interpreter.rete.network.StandardNode
appendChild, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, propagateUpdate, removeChildMethods inherited from class tools.refinery.interpreter.rete.network.BaseNode
acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCoreMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.refinery.interpreter.rete.network.Node
acceptPropagatedTraceInfo, assignTraceInfo, getCommunicationTracker, getContainer, getNodeId, getTag, getTraceInfos, setTagMethods inherited from interface tools.refinery.interpreter.rete.network.Receiver
appendParent, batchUpdate, getMailbox, getParents, removeParentMethods inherited from interface tools.refinery.interpreter.rete.network.Supplier
appendChild, getPulledContents, getPulledContents, getReceivers, removeChild
-
Field Details
-
memory
-
rederivableMemory
- Since:
- 1.6
-
deleteRederiveEvaluation
protected boolean deleteRederiveEvaluation- Since:
- 1.6
-
currentGroup
- Since:
- 1.7
-
coreMask
OPTIONAL ELEMENT - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLE- Since:
- 1.6
-
posetMask
OPTIONAL ELEMENTS - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLE- Since:
- 1.6
-
posetComparator
OPTIONAL ELEMENTS - ONLY PRESENT IF MONOTONICITY INFO WAS AVAILABLE- Since:
- 1.6
-
-
Constructor Details
-
UniquenessEnforcerNode
-
UniquenessEnforcerNode
public UniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth, boolean deleteRederiveEvaluation) - Since:
- 1.6
-
UniquenessEnforcerNode
public UniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth, boolean deleteRederiveEvaluation, TupleMask coreMask, TupleMask posetMask, IPosetComparator posetComparator) - Since:
- 1.6
-
-
Method Details
-
pullInto
Description copied from interface:SupplierPulls the contents of this object in this particular moment into a target collection. -
getTuples
- Specified by:
getTuplesin classAbstractUniquenessEnforcerNode- Since:
- 2.8
-
isInDRedMode
public boolean isInDRedMode()Description copied from interface:RederivableNodeReturns true if this node actually runs in DRed mode (not necessarily).- Specified by:
isInDRedModein interfaceRederivableNode- Returns:
- true if the node is operating in DRed mode
-
getCoreMask
- Specified by:
getCoreMaskin interfacePosetAwareReceiver
-
getPosetMask
- Specified by:
getPosetMaskin interfacePosetAwareReceiver
-
getPosetComparator
- Specified by:
getPosetComparatorin interfacePosetAwareReceiver
-
pullIntoWithTimeline
- Specified by:
pullIntoWithTimelinein interfaceSupplier
-
instantiateMailbox
- Specified by:
instantiateMailboxin classAbstractUniquenessEnforcerNode- Since:
- 2.0
-
update
Description copied from interface:ReceiverUpdates the receiver with a newly found or lost partial matching. -
updateWithPosetInfo
Description copied from interface:PosetAwareReceiverUpdates the receiver with a newly found or lost partial matching also providing information whether the update is a monotone change or not.- Specified by:
updateWithPosetInfoin interfacePosetAwareReceiver- Parameters:
direction- the direction of the updateupdate- the update tuplemonotone- true if the update is monotone, false otherwise
-
updateWithDeleteAndRederive
- Since:
- 2.4
-
updateDefault
- Since:
- 2.4
-
rederiveOne
public void rederiveOne()Description copied from interface:RederivableNodeThe method is called by theReteContainerto 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.- Specified by:
rederiveOnein interfaceRederivableNode- Since:
- 1.6
-
getNullIndexer
- Specified by:
getNullIndexerin classAbstractUniquenessEnforcerNode
-
getIdentityIndexer
- Specified by:
getIdentityIndexerin classAbstractUniquenessEnforcerNode
-
getCurrentGroup
- Specified by:
getCurrentGroupin interfaceIGroupable- Returns:
- the current group of the mailbox
-
setCurrentGroup
Description copied from interface:IGroupableSets the current group of the mailbox- Specified by:
setCurrentGroupin interfaceIGroupable
-