|
||||||||||
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.ObjectSource
org.drools.reteoo.RightInputAdapterNode
public class RightInputAdapterNode
When joining a subnetwork into the main network again, RightInputAdapterNode adapts the subnetwork's tuple into a fact in order right join it with the tuple being propagated in the main network.
Nested Class Summary | |
---|---|
static class |
RightInputAdapterNode.RIAMemory
|
Field Summary | |
---|---|
protected boolean |
tupleMemoryEnabled
|
Fields inherited from class org.drools.reteoo.ObjectSource |
---|
sink, source |
Fields inherited from class org.drools.common.BaseNode |
---|
associations, id, partitionId, partitionsEnabled |
Constructor Summary | |
---|---|
RightInputAdapterNode()
|
|
RightInputAdapterNode(int id,
LeftTupleSource source,
BuildContext context)
Constructor specifying the unique id of the node in the Rete network, the position of the propagating FactHandleImpl in
ReteTuple and the source that propagates the receive ReteTuple |
Method Summary | |
---|---|
void |
assertLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
Takes the asserted ReteTuple received from the TupleSource and
adapts it into a FactHandleImpl |
void |
attach()
Attaches the node into the network. |
void |
attach(InternalWorkingMemory[] workingMemories)
|
LeftTuple |
createLeftTuple(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple |
createLeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink)
|
Memory |
createMemory(RuleBaseConfiguration config)
Creates and return the node memory |
protected void |
doRemove(RuleRemovalContext context,
ReteooBuilder builder,
BaseNode node,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
boolean |
equals(Object object)
|
LeftTupleSource |
getLeftTupleSource()
|
LeftTupleSinkNode |
getNextLeftTupleSinkNode()
Returns the next node |
LeftTupleSinkNode |
getPreviousLeftTupleSinkNode()
Returns the previous node |
short |
getType()
|
int |
hashCode()
The hashCode return is simply the unique id of the node. |
boolean |
isLeftTupleMemoryEnabled()
|
void |
modifyLeftTuple(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
modifyLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
networkUpdated()
A method that is called for all nodes whose network below them changed, after the change is complete, providing them with an oportunity for state update |
void |
readExternal(ObjectInput in)
|
void |
retractLeftTuple(LeftTuple tuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
Retracts the corresponding tuple by retrieving and retracting the fact created for it |
void |
setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
|
void |
setNextLeftTupleSinkNode(LeftTupleSinkNode next)
Sets the next node |
void |
setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
Sets the previous node |
String |
toString()
|
void |
updateSink(ObjectSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class org.drools.reteoo.ObjectSource |
---|
addObjectSink, getParentObjectSource, getSinkPropagator, isInUse, removeObjectSink |
Methods inherited from class org.drools.common.BaseNode |
---|
addAssociation, getAssociations, getId, getPartitionId, remove, removeAssociation, setPartitionId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.drools.common.NetworkNode |
---|
getId, getPartitionId |
Methods inherited from interface org.drools.common.NodeMemory |
---|
getId |
Field Detail |
---|
protected boolean tupleMemoryEnabled
Constructor Detail |
---|
public RightInputAdapterNode()
public RightInputAdapterNode(int id, LeftTupleSource source, BuildContext context)
FactHandleImpl
in
ReteTuple
and the source that propagates the receive ReteTuples.
- Parameters:
id
- Unique idsource
- The TupleSource
which propagates the received ReteTuple
Method Detail |
---|
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class ObjectSource
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class ObjectSource
IOException
public Memory createMemory(RuleBaseConfiguration config)
createMemory
in interface NodeMemory
public void assertLeftTuple(LeftTuple leftTuple, PropagationContext context, InternalWorkingMemory workingMemory)
ReteTuple
received from the TupleSource
and
adapts it into a FactHandleImpl
assertLeftTuple
in interface LeftTupleSink
tuple
- The asserted ReteTuple
.context
- The PropagationContext
of the WorkingMemory action.workingMemory
- the WorkingMemory
session.
public void retractLeftTuple(LeftTuple tuple, PropagationContext context, InternalWorkingMemory workingMemory)
retractLeftTuple
in interface LeftTupleSink
public void modifyLeftTuple(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory)
modifyLeftTuple
in interface LeftTupleSink
public void modifyLeftTuple(LeftTuple leftTuple, PropagationContext context, InternalWorkingMemory workingMemory)
modifyLeftTuple
in interface LeftTupleSink
public void attach()
BaseNode
ObjectSource
or TupleSource
attach
in class BaseNode
public void attach(InternalWorkingMemory[] workingMemories)
attach
in class BaseNode
public void networkUpdated()
BaseNode
networkUpdated
in class ObjectSource
public void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
updateSink
in class ObjectSource
protected void doRemove(RuleRemovalContext context, ReteooBuilder builder, BaseNode node, InternalWorkingMemory[] workingMemories)
BaseNode
ObjectSource
or TupleSource
doRemove
in class ObjectSource
public boolean isLeftTupleMemoryEnabled()
isLeftTupleMemoryEnabled
in interface LeftTupleSink
public void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
setLeftTupleMemoryEnabled
in interface LeftTupleSink
public LeftTupleSinkNode getNextLeftTupleSinkNode()
getNextLeftTupleSinkNode
in interface LeftTupleSinkNode
public void setNextLeftTupleSinkNode(LeftTupleSinkNode next)
setNextLeftTupleSinkNode
in interface LeftTupleSinkNode
next
- The next TupleSinkNodepublic LeftTupleSinkNode getPreviousLeftTupleSinkNode()
getPreviousLeftTupleSinkNode
in interface LeftTupleSinkNode
public void setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
setPreviousLeftTupleSinkNode
in interface LeftTupleSinkNode
previous
- The previous TupleSinkNodepublic short getType()
getType
in interface LeftTupleSink
public int hashCode()
BaseNode
hashCode
in class BaseNode
public boolean equals(Object object)
equals
in class Object
public String toString()
toString
in class BaseNode
public LeftTuple createLeftTuple(InternalFactHandle factHandle, LeftTupleSink sink, boolean leftTupleMemoryEnabled)
createLeftTuple
in interface LeftTupleSink
public LeftTuple createLeftTuple(LeftTuple leftTuple, LeftTupleSink sink, boolean leftTupleMemoryEnabled)
createLeftTuple
in interface LeftTupleSink
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTupleSink sink)
createLeftTuple
in interface LeftTupleSink
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, LeftTupleSink sink, boolean leftTupleMemoryEnabled)
createLeftTuple
in interface LeftTupleSink
public LeftTupleSource getLeftTupleSource()
getLeftTupleSource
in interface LeftTupleSink
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |