|
||||||||||
| 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 |
|---|
declaredMask, inferredMask, 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(BuildContext context)
Attaches the node into the network. |
long |
calculateDeclaredMask(List<String> settableProperties)
|
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 |
doCollectAncestors(NodeSet nodeSet)
|
protected void |
doRemove(RuleRemovalContext context,
ReteooBuilder builder,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
boolean |
equals(Object object)
|
ObjectTypeNode.Id |
getLeftInputOtnId()
|
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(UpdateContext updateContext)
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 |
setLeftInputOtnId(ObjectTypeNode.Id leftInputOtnId)
|
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 |
updateSinkOnAttach(BuildContext context,
PropagationContext propagationContext,
InternalWorkingMemory workingMemory)
|
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class org.drools.reteoo.ObjectSource |
|---|
addObjectSink, getDeclaredMask, getObjectTypeNode, getParentObjectSource, getSinkPropagator, initDeclaredMask, isInUse, needsMaskUpdate, removeObjectSink, resetInferredMask, updateMask |
| Methods inherited from class org.drools.common.BaseNode |
|---|
addAssociation, attach, collectAncestors, getAssociations, getId, getPartitionId, remove, removeAssociation, setPartitionId, updateSinkOnAttach |
| 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 ExternalizablereadExternal in class ObjectSourceIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class ObjectSourceIOExceptionpublic 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 LeftTupleSinktuple - 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 LeftTupleSinkpublic void attach(BuildContext context)
BaseNodeObjectSource or TupleSource
attach in class BaseNode
public void updateSinkOnAttach(BuildContext context,
PropagationContext propagationContext,
InternalWorkingMemory workingMemory)
updateSinkOnAttach in class BaseNodepublic void networkUpdated(UpdateContext updateContext)
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,
InternalWorkingMemory[] workingMemories)
BaseNodeObjectSource or TupleSource
doRemove in class ObjectSourceprotected void doCollectAncestors(NodeSet nodeSet)
doCollectAncestors in class ObjectSourcepublic boolean isLeftTupleMemoryEnabled()
isLeftTupleMemoryEnabled in interface LeftTupleSinkpublic void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
setLeftTupleMemoryEnabled in interface LeftTupleSinkpublic LeftTupleSinkNode getNextLeftTupleSinkNode()
getNextLeftTupleSinkNode in interface LeftTupleSinkNodepublic void setNextLeftTupleSinkNode(LeftTupleSinkNode next)
setNextLeftTupleSinkNode in interface LeftTupleSinkNodenext - The next TupleSinkNodepublic LeftTupleSinkNode getPreviousLeftTupleSinkNode()
getPreviousLeftTupleSinkNode in interface LeftTupleSinkNodepublic void setPreviousLeftTupleSinkNode(LeftTupleSinkNode previous)
setPreviousLeftTupleSinkNode in interface LeftTupleSinkNodeprevious - The previous TupleSinkNodepublic short getType()
getType in interface NetworkNodegetType in interface LeftTupleSinkpublic int hashCode()
BaseNode
hashCode in class BaseNodepublic boolean equals(Object object)
equals in class Objectpublic 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 LeftTupleSinkpublic LeftTupleSource getLeftTupleSource()
getLeftTupleSource in interface LeftTupleSinkpublic ObjectTypeNode.Id getLeftInputOtnId()
getLeftInputOtnId in interface LeftTupleSinkpublic void setLeftInputOtnId(ObjectTypeNode.Id leftInputOtnId)
setLeftInputOtnId in interface LeftTupleSinkpublic long calculateDeclaredMask(List<String> settableProperties)
calculateDeclaredMask in class ObjectSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||