|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.common.BaseNode
org.drools.reteoo.TupleSource
org.drools.reteoo.CollectNode
public class CollectNode
Nested Class Summary | |
---|---|
static class |
CollectNode.CollectMemory
|
Field Summary | |
---|---|
protected BetaConstraints |
constraints
|
protected TupleSource |
leftInput
The left input TupleSource . |
protected boolean |
objectMemory
|
protected ObjectSource |
rightInput
The right input TupleSource . |
protected boolean |
tupleMemoryEnabled
|
Fields inherited from class org.drools.reteoo.TupleSource |
---|
sink |
Fields inherited from class org.drools.common.BaseNode |
---|
id |
Constructor Summary | |
---|---|
CollectNode(int id,
TupleSource leftInput,
ObjectSource rightInput,
AlphaNodeFieldConstraint[] resultConstraints,
BetaConstraints sourceBinder,
BetaConstraints resultsBinder,
Collect collect,
boolean unwrapRight,
BuildContext context)
Constructor. |
Method Summary | |
---|---|
void |
assertObject(InternalFactHandle handle,
PropagationContext context,
InternalWorkingMemory workingMemory)
Assert a new FactHandleImpl . |
void |
assertTuple(ReteTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
Assert a new ReteTuple . |
void |
attach()
Attaches the node into the network. |
void |
attach(InternalWorkingMemory[] workingMemories)
|
java.lang.Object |
createMemory(RuleBaseConfiguration config)
Creates a BetaMemory for the BetaNode's memory. |
void |
dumpMemory(InternalWorkingMemory workingMemory)
|
boolean |
equals(java.lang.Object object)
|
BetaNodeFieldConstraint[] |
getConstraints()
|
ObjectSinkNode |
getNextObjectSinkNode()
Returns the next node |
TupleSinkNode |
getNextTupleSinkNode()
Returns the next node |
ObjectTypeNode |
getObjectTypeNode()
|
ObjectSinkNode |
getPreviousObjectSinkNode()
Returns the previous node |
TupleSinkNode |
getPreviousTupleSinkNode()
Returns the previous node |
java.util.List |
getRules()
|
int |
hashCode()
The hashCode return is simply the unique id of the node. |
boolean |
isObjectMemoryEnabled()
|
boolean |
isTupleMemoryEnabled()
|
void |
modifyTuple(boolean isAssert,
ReteTuple leftTuple,
InternalFactHandle handle,
PropagationContext context,
InternalWorkingMemory workingMemory)
Modifies the results match for a tuple, retracting it and repropagating if constraints allow it |
void |
remove(RuleRemovalContext context,
BaseNode node,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
void |
retractObject(InternalFactHandle handle,
PropagationContext context,
InternalWorkingMemory workingMemory)
Retract an existing FactHandleImpl . |
void |
retractTuple(ReteTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
setNextObjectSinkNode(ObjectSinkNode next)
Sets the next node |
void |
setNextTupleSinkNode(TupleSinkNode next)
Sets the next node |
void |
setObjectMemoryEnabled(boolean objectMemory)
|
void |
setPreviousObjectSinkNode(ObjectSinkNode previous)
Sets the previous node |
void |
setPreviousTupleSinkNode(TupleSinkNode previous)
Sets the previous node |
void |
setTupleMemoryEnabled(boolean tupleMemoryEnabled)
|
java.lang.String |
toString()
|
void |
updateSink(TupleSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
Methods inherited from class org.drools.reteoo.TupleSource |
---|
addTupleSink, getSinkPropagator, isInUse, removeTupleSink |
Methods inherited from class org.drools.common.BaseNode |
---|
getId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.drools.reteoo.TupleSink |
---|
isTupleMemoryEnabled, setTupleMemoryEnabled |
Methods inherited from interface org.drools.reteoo.ObjectSink |
---|
isObjectMemoryEnabled, setObjectMemoryEnabled |
Methods inherited from interface org.drools.common.NodeMemory |
---|
getId |
Field Detail |
---|
protected final TupleSource leftInput
TupleSource
.
protected final ObjectSource rightInput
TupleSource
.
protected final BetaConstraints constraints
protected boolean objectMemory
protected boolean tupleMemoryEnabled
Constructor Detail |
---|
public CollectNode(int id, TupleSource leftInput, ObjectSource rightInput, AlphaNodeFieldConstraint[] resultConstraints, BetaConstraints sourceBinder, BetaConstraints resultsBinder, Collect collect, boolean unwrapRight, BuildContext context)
id
- The id for the nodeleftInput
- The left input TupleSource
.rightInput
- The right input ObjectSource
.resultConstraints
- The alpha constraints to be applied to the resulting collectionsourceBinder
- The beta binder to be applied to the source factsresultsBinder
- The beta binder to be applied to the resulting collectioncollect
- The collect conditional elementMethod Detail |
---|
public void assertTuple(ReteTuple leftTuple, PropagationContext context, InternalWorkingMemory workingMemory)
TupleSink
ReteTuple
.
assertTuple
in interface TupleSink
leftTuple
- The ReteTuple
to propagate.context
- The PropagationContext
of the WorkingMemory actionworkingMemory
- the WorkingMemory
session.
public void retractTuple(ReteTuple leftTuple, PropagationContext context, InternalWorkingMemory workingMemory)
retractTuple
in interface TupleSink
public void assertObject(InternalFactHandle handle, PropagationContext context, InternalWorkingMemory workingMemory)
ObjectSink
FactHandleImpl
.
assertObject
in interface ObjectSink
handle
- The asserted FactHandle/code>.context
- The PropagationContext
of the WorkingMemory action.workingMemory
- the WorkingMemory
session.
public void retractObject(InternalFactHandle handle, PropagationContext context, InternalWorkingMemory workingMemory)
ObjectSink
FactHandleImpl
.
retractObject
in interface ObjectSink
handle
- The FactHandle/code> to retract.context
- The PropagationContext
of the WorkingMemory action.workingMemory
- the WorkingMemory
session.
public void modifyTuple(boolean isAssert, ReteTuple leftTuple, InternalFactHandle handle, PropagationContext context, InternalWorkingMemory workingMemory)
leftTuple
- handle
- context
- workingMemory
- public void updateSink(TupleSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
updateSink
in class TupleSource
public int hashCode()
BaseNode
public boolean equals(java.lang.Object object)
public java.lang.String toString()
public java.lang.Object createMemory(RuleBaseConfiguration config)
createMemory
in interface NodeMemory
public BetaNodeFieldConstraint[] getConstraints()
public void attach()
BaseNode
ObjectSource
or TupleSource
attach
in class BaseNode
public java.util.List getRules()
public ObjectTypeNode getObjectTypeNode()
public void attach(InternalWorkingMemory[] workingMemories)
attach
in class BaseNode
public void remove(RuleRemovalContext context, BaseNode node, InternalWorkingMemory[] workingMemories)
BaseNode
ObjectSource
or TupleSource
remove
in class BaseNode
public boolean isObjectMemoryEnabled()
isObjectMemoryEnabled
in interface ObjectSink
public void setObjectMemoryEnabled(boolean objectMemory)
setObjectMemoryEnabled
in interface ObjectSink
public boolean isTupleMemoryEnabled()
isTupleMemoryEnabled
in interface TupleSink
public void setTupleMemoryEnabled(boolean tupleMemoryEnabled)
setTupleMemoryEnabled
in interface TupleSink
public void dumpMemory(InternalWorkingMemory workingMemory)
public TupleSinkNode getNextTupleSinkNode()
getNextTupleSinkNode
in interface TupleSinkNode
public void setNextTupleSinkNode(TupleSinkNode next)
setNextTupleSinkNode
in interface TupleSinkNode
next
- The next TupleSinkNodepublic TupleSinkNode getPreviousTupleSinkNode()
getPreviousTupleSinkNode
in interface TupleSinkNode
public void setPreviousTupleSinkNode(TupleSinkNode previous)
setPreviousTupleSinkNode
in interface TupleSinkNode
previous
- The previous TupleSinkNodepublic ObjectSinkNode getNextObjectSinkNode()
getNextObjectSinkNode
in interface ObjectSinkNode
public void setNextObjectSinkNode(ObjectSinkNode next)
setNextObjectSinkNode
in interface ObjectSinkNode
next
- The next ObjectSinkNodepublic ObjectSinkNode getPreviousObjectSinkNode()
getPreviousObjectSinkNode
in interface ObjectSinkNode
public void setPreviousObjectSinkNode(ObjectSinkNode previous)
setPreviousObjectSinkNode
in interface ObjectSinkNode
previous
- The previous ObjectSinkNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |