|
Drools :: Core 6.0.0.Beta5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.core.common.BaseNode
org.drools.core.reteoo.LeftTupleSource
org.drools.core.reteoo.LeftInputAdapterNode
public class LeftInputAdapterNode
All asserting Facts must propagated into the right ObjectSink side of a BetaNode, if this is the first Pattern
then there are no BetaNodes to propagate to. LeftInputAdapter is used to adapt an ObjectSink propagation into a
TupleSource which propagates a ReteTuple suitable fot the right ReteTuple side
of a BetaNode.
| Nested Class Summary | |
|---|---|
static class |
LeftInputAdapterNode.LiaNodeMemory
|
static class |
LeftInputAdapterNode.RightTupleSinkAdapter
Used with the updateSink method, so that the parent ObjectSource can update the TupleSink |
| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
log
|
protected boolean |
rootQueryNode
|
protected boolean |
unlinkingEnabled
|
| Fields inherited from class org.drools.core.reteoo.LeftTupleSource |
|---|
leftInput, sink |
| Fields inherited from class org.drools.core.common.BaseNode |
|---|
associations, id, partitionId, partitionsEnabled, streamMode |
| Constructor Summary | |
|---|---|
LeftInputAdapterNode()
|
|
LeftInputAdapterNode(int id,
ObjectSource source,
BuildContext context)
Constructus a LeftInputAdapterNode with a unique id that receives FactHandle from a
parent ObjectSource and adds it to a given pattern in the resulting Tuples. |
|
| Method Summary | |
|---|---|
void |
assertObject(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory)
Takes the asserted FactHandleImpl received from the ObjectSource and puts it
in a new ReteTuple before propagating to the TupleSinks |
void |
attach(BuildContext context)
Attaches the node into the network. |
void |
byPassModifyToBetaNode(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
Memory |
createMemory(RuleBaseConfiguration config,
InternalWorkingMemory wm)
|
LeftTuple |
createPeer(LeftTuple original)
|
protected void |
doCollectAncestors(NodeSet nodeSet)
|
static void |
doDeleteObject(LeftTuple leftTuple,
PropagationContext context,
SegmentMemory sm,
InternalWorkingMemory wm,
LeftInputAdapterNode liaNode,
boolean linkOrNotify,
LeftInputAdapterNode.LiaNodeMemory lm)
|
static void |
doInsertObject(InternalFactHandle factHandle,
PropagationContext context,
LeftInputAdapterNode liaNode,
InternalWorkingMemory wm,
LeftInputAdapterNode.LiaNodeMemory lm,
boolean linkOrNotify,
boolean useLeftMemory)
|
protected void |
doRemove(RuleRemovalContext context,
ReteooBuilder builder,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
static void |
doUpdateObject(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory wm,
LeftInputAdapterNode liaNode,
boolean linkOrNotify,
SegmentMemory sm)
|
boolean |
equals(Object object)
|
ObjectSinkNode |
getNextObjectSinkNode()
Returns the next node |
ObjectSource |
getObjectSource()
|
protected ObjectTypeNode |
getObjectTypeNode()
|
ObjectSource |
getParentObjectSource()
|
ObjectSinkNode |
getPreviousObjectSinkNode()
Returns the previous node |
int |
getSegmentMemoryIndex()
|
short |
getType()
|
int |
hashCode()
The hashCode return is simply the unique id of the node. |
boolean |
isLeftTupleMemoryEnabled()
|
boolean |
isRootQueryNode()
|
boolean |
isUnlinkingEnabled()
|
void |
modifyObject(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
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 leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
setNextObjectSinkNode(ObjectSinkNode next)
Sets the next node |
void |
setPreviousObjectSinkNode(ObjectSinkNode previous)
Sets the previous node |
void |
setSegmentMemoryIndex(int segmentMemoryIndex)
|
void |
setUnlinkingEnabled(boolean unlinkingEnabled)
|
void |
updateSink(LeftTupleSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class org.drools.core.reteoo.LeftTupleSource |
|---|
addTupleSink, addTupleSink, addTupleSink, doModifyLeftTuple, getLeftDeclaredMask, getLeftInferredMask, getLeftInputOtnId, getLeftNegativeMask, getLeftTupleSource, getObjectType, getSinkPropagator, initDeclaredMask, initInferredMask, initMasks, isInUse, modifyLeftTuple, removeTupleSink, setLeftInferredMask, setLeftInputOtnId, setLeftListenedProperties, setLeftTupleSource |
| Methods inherited from class org.drools.core.common.BaseNode |
|---|
addAssociation, attach, collectAncestors, getAssociations, getId, getPartitionId, isStreamMode, remove, removeAssociation, setId, setPartitionId, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.drools.core.common.NetworkNode |
|---|
getAssociations, getId, getPartitionId |
| Methods inherited from interface org.drools.core.common.MemoryFactory |
|---|
getId |
| Field Detail |
|---|
protected static transient org.slf4j.Logger log
protected boolean rootQueryNode
protected boolean unlinkingEnabled
| Constructor Detail |
|---|
public LeftInputAdapterNode()
public LeftInputAdapterNode(int id,
ObjectSource source,
BuildContext context)
FactHandle from a
parent ObjectSource and adds it to a given pattern in the resulting Tuples.
id - The unique id of this node in the current Rete networksource - The parent node, where Facts are propagated from| Method Detail |
|---|
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class LeftTupleSourceIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class LeftTupleSourceIOExceptionpublic ObjectSource getObjectSource()
public int getSegmentMemoryIndex()
public void setSegmentMemoryIndex(int segmentMemoryIndex)
public short getType()
getType in interface NetworkNodegetType in class LeftTupleSourcepublic boolean isRootQueryNode()
public boolean isUnlinkingEnabled()
isUnlinkingEnabled in class LeftTupleSourcepublic boolean isLeftTupleMemoryEnabled()
isLeftTupleMemoryEnabled in class LeftTupleSourcepublic void setUnlinkingEnabled(boolean unlinkingEnabled)
public ObjectSource getParentObjectSource()
public void attach(BuildContext context)
BaseNodeObjectSource or TupleSource
attach in class BaseNodepublic void networkUpdated(UpdateContext updateContext)
BaseNode
networkUpdated in class BaseNode
public void assertObject(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory)
FactHandleImpl received from the ObjectSource and puts it
in a new ReteTuple before propagating to the TupleSinks
assertObject in interface ObjectSinkfactHandle - The asserted FactHandle/code>.context - The PropagationContext of the WorkingMemory action.workingMemory - the WorkingMemory session.
public static void doInsertObject(InternalFactHandle factHandle,
PropagationContext context,
LeftInputAdapterNode liaNode,
InternalWorkingMemory wm,
LeftInputAdapterNode.LiaNodeMemory lm,
boolean linkOrNotify,
boolean useLeftMemory)
public static void doDeleteObject(LeftTuple leftTuple,
PropagationContext context,
SegmentMemory sm,
InternalWorkingMemory wm,
LeftInputAdapterNode liaNode,
boolean linkOrNotify,
LeftInputAdapterNode.LiaNodeMemory lm)
public static void doUpdateObject(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory wm,
LeftInputAdapterNode liaNode,
boolean linkOrNotify,
SegmentMemory sm)
public void retractLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
public void modifyObject(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
modifyObject in interface ObjectSink
public void byPassModifyToBetaNode(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
byPassModifyToBetaNode in interface ObjectSink
public void updateSink(LeftTupleSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
updateSink in class LeftTupleSource
protected void doRemove(RuleRemovalContext context,
ReteooBuilder builder,
InternalWorkingMemory[] workingMemories)
BaseNodeObjectSource or TupleSource
doRemove in class BaseNodeprotected void doCollectAncestors(NodeSet nodeSet)
doCollectAncestors in class BaseNodepublic LeftTuple createPeer(LeftTuple original)
createPeer in class LeftTupleSourcepublic ObjectSinkNode getNextObjectSinkNode()
getNextObjectSinkNode in interface ObjectSinkNodepublic void setNextObjectSinkNode(ObjectSinkNode next)
setNextObjectSinkNode in interface ObjectSinkNodenext - The next ObjectSinkNodepublic ObjectSinkNode getPreviousObjectSinkNode()
getPreviousObjectSinkNode in interface ObjectSinkNodepublic void setPreviousObjectSinkNode(ObjectSinkNode previous)
setPreviousObjectSinkNode in interface ObjectSinkNodeprevious - The previous ObjectSinkNodepublic int hashCode()
BaseNode
hashCode in class BaseNodepublic boolean equals(Object object)
equals in class Objectprotected ObjectTypeNode getObjectTypeNode()
getObjectTypeNode in class LeftTupleSource
public Memory createMemory(RuleBaseConfiguration config,
InternalWorkingMemory wm)
createMemory in interface MemoryFactory
|
Drools :: Core 6.0.0.Beta5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||