org.drools.core.reteoo
Class ExistsNode
java.lang.Object
org.drools.core.common.BaseNode
org.drools.core.reteoo.LeftTupleSource
org.drools.core.reteoo.BetaNode
org.drools.core.reteoo.ExistsNode
- All Implemented Interfaces:
- Externalizable, Serializable, MemoryFactory, NetworkNode, LeftTupleSink, LeftTupleSinkNode, ObjectSink, ObjectSinkNode, RightTupleSink, Sink
public class ExistsNode
- extends BetaNode
ExistsNode extends BetaNode to perform tests for
the existence of a Fact plus one or more conditions. Where existence
is found the left ReteTuple is copied and propagated. Further to this it
maintains the "truth" by canceling any
Activations that are no longer
considered true by the retraction of ReteTuple's or FactHandleImpl.
Tuples are considered to be asserted from the left input and facts from the right input.
The BetaNode provides the BetaMemory to store asserted ReteTuples and
FactHandleImpls. Each fact handle is stored in the right
memory.
- See Also:
- Serialized Form
|
Method Summary |
void |
assertLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
Assert a new ReteTuple. |
void |
assertRightTuple(RightTuple rightTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
LeftTuple |
createLeftTuple(InternalFactHandle factHandle,
LeftTuple leftTuple,
LeftTupleSink sink)
|
LeftTuple |
createLeftTuple(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
LeftTupleSink sink,
PropagationContext pctx,
boolean leftTupleMemoryEnabled)
|
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink)
|
LeftTuple |
createPeer(LeftTuple original)
|
void |
doRemove(RuleRemovalContext context,
ReteooBuilder builder,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
short |
getType()
|
boolean |
isLeftUpdateOptimizationAllowed()
|
void |
modifyLeftTuple(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
modifyLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
modifyRightTuple(RightTuple rightTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
retractLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
retractRightTuple(RightTuple rightTuple,
PropagationContext pctx,
InternalWorkingMemory workingMemory)
|
String |
toString()
|
void |
updateSink(LeftTupleSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
| Methods inherited from class org.drools.core.reteoo.BetaNode |
assertObject, attach, byPassModifyToBetaNode, createMemory, createRightTuple, doDeleteRightTuple, doUpdateRightTuple, dumpMemory, equals, getBetaMemory, getBetaMemoryFromRightInput, getConstraints, getFirstLeftTuple, getFirstLeftTuple, getFirstRightTuple, getFirstRightTuple, getLeftIterator, getLeftTupleSource, getNextLeftTupleSinkNode, getNextObjectSinkNode, getObjectTypeNode, getPreviousLeftTupleSinkNode, getPreviousObjectSinkNode, getRawConstraints, getRightDeclaredMask, getRightInferredMask, getRightInput, getRightInputOtnId, getRightIterator, getRightIterator, getRightNegativeMask, getRules, hashCode, initDeclaredMask, initInferredMask, initInferredMask, isConcurrentRightTupleMemory, isIndexedUnificationJoin, isLeftTupleMemoryEnabled, isObjectMemoryEnabled, isRightInputIsRiaNode, modifyObject, networkUpdated, readExternal, setConcurrentRightTupleMemory, setConstraints, setLeftListenedProperties, setLeftTupleMemoryEnabled, setNextLeftTupleSinkNode, setNextObjectSinkNode, setObjectMemoryEnabled, setPreviousLeftTupleSinkNode, setPreviousObjectSinkNode, setRightDeclaredMask, setRightInputOtnId, setUnificationJoin, unwrapRightInput, writeExternal |
| Methods inherited from class org.drools.core.reteoo.LeftTupleSource |
addTupleSink, addTupleSink, addTupleSink, getLeftDeclaredMask, getLeftInferredMask, getLeftInputOtnId, getLeftNegativeMask, getObjectType, getSinkPropagator, initMasks, isInUse, removeTupleSink, setLeftInferredMask, setLeftInputOtnId, setLeftTupleSource |
ExistsNode
public ExistsNode()
ExistsNode
public ExistsNode(int id,
LeftTupleSource leftInput,
ObjectSource rightInput,
BetaConstraints joinNodeBinder,
BuildContext context)
toString
public String toString()
- Overrides:
toString in class BetaNode
getType
public short getType()
- Specified by:
getType in interface NetworkNode- Specified by:
getType in interface LeftTupleSink- Specified by:
getType in interface RightTupleSink- Specified by:
getType in class LeftTupleSource
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle,
LeftTuple leftTuple,
LeftTupleSink sink)
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple,
LeftTupleSink sink,
PropagationContext pctx,
boolean leftTupleMemoryEnabled)
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink)
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
createPeer
public LeftTuple createPeer(LeftTuple original)
- Specified by:
createPeer in interface LeftTupleSink- Specified by:
createPeer in class LeftTupleSource
assertRightTuple
public void assertRightTuple(RightTuple rightTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
retractRightTuple
public void retractRightTuple(RightTuple rightTuple,
PropagationContext pctx,
InternalWorkingMemory workingMemory)
modifyRightTuple
public void modifyRightTuple(RightTuple rightTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
assertLeftTuple
public void assertLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
- Description copied from interface:
LeftTupleSink
- Assert a new
ReteTuple.
- Parameters:
leftTuple - The ReteTuple to propagate.context - The PropagationContext of the WorkingMemory actionworkingMemory - the WorkingMemory session.
retractLeftTuple
public void retractLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
modifyLeftTuple
public void modifyLeftTuple(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
modifyLeftTuple
public void modifyLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
updateSink
public void updateSink(LeftTupleSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
- Specified by:
updateSink in class LeftTupleSource
doRemove
public void doRemove(RuleRemovalContext context,
ReteooBuilder builder,
InternalWorkingMemory[] workingMemories)
- Description copied from class:
BaseNode
- Removes the node from teh network. Usually from the parent
ObjectSource or TupleSource
- Specified by:
doRemove in class BaseNode
isLeftUpdateOptimizationAllowed
public boolean isLeftUpdateOptimizationAllowed()
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.