public class LeftInputAdapterNode extends LeftTupleSource implements ObjectSinkNode, MemoryFactory<LeftInputAdapterNode.LiaNodeMemory>
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
.Modifier and Type | Class and Description |
---|---|
static class |
LeftInputAdapterNode.LiaNodeMemory |
static class |
LeftInputAdapterNode.RightTupleSinkAdapter
Used with the updateSink method, so that the parent ObjectSource
can update the TupleSink
|
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
leftInput, sink
associations, hashcode, id, memoryId, partitionId, partitionsEnabled
Constructor and Description |
---|
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. |
addTupleSink, addTupleSink, addTupleSink, getLeftDeclaredMask, getLeftInferredMask, getLeftInputOtnId, getLeftInputPattern, getLeftNegativeMask, getLeftTupleSource, getObjectType, getObjectTypeForPropertyReactivity, getPositionInPath, getSinkPropagator, initDeclaredMask, initInferredMask, initMasks, isInUse, removeTupleSink, setLeftInferredMask, setLeftInputOtnId, setLeftListenedProperties, setLeftTupleSource, setPartitionIdWithSinks, setSourcePartitionId
addAssociation, addAssociation, getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionsEnabled, setStreamMode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setPartitionIdWithSinks
getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, isAssociatedWith
getMemoryId
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 frompublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class LeftTupleSource
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class LeftTupleSource
IOException
public ObjectSource getObjectSource()
public short getType()
getType
in interface NetworkNode
getType
in class LeftTupleSource
public boolean isLeftTupleMemoryEnabled()
isLeftTupleMemoryEnabled
in class LeftTupleSource
public ObjectSource getParentObjectSource()
public void attach(BuildContext context)
BaseNode
ObjectSource
or TupleSource
public void networkUpdated(UpdateContext updateContext)
BaseNode
networkUpdated
in class BaseNode
public void assertObject(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory)
assertObject
in interface ObjectSink
public static void doInsertObject(InternalFactHandle factHandle, PropagationContext context, LeftInputAdapterNode liaNode, InternalWorkingMemory wm, LeftInputAdapterNode.LiaNodeMemory lm, boolean linkOrNotify, boolean useLeftMemory)
public static void doInsertSegmentMemory(InternalWorkingMemory wm, boolean linkOrNotify, LeftInputAdapterNode.LiaNodeMemory lm, SegmentMemory sm, LeftTuple leftTuple, boolean streamMode)
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, LeftInputAdapterNode.LiaNodeMemory lm, 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
protected boolean doRemove(RuleRemovalContext context, ReteooBuilder builder)
BaseNode
ObjectSource
or TupleSource
public LeftTuple createPeer(LeftTuple original)
createPeer
in class LeftTupleSource
public 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 ObjectSinkNodepublic ObjectTypeNode getObjectTypeNode()
getObjectTypeNode
in class BaseNode
public LeftInputAdapterNode.LiaNodeMemory createMemory(RuleBaseConfiguration config, InternalWorkingMemory wm)
createMemory
in interface MemoryFactory<LeftInputAdapterNode.LiaNodeMemory>
public void setSourcePartitionId(BuildContext context, RuleBasePartitionId partitionId)
setSourcePartitionId
in class LeftTupleSource
public void setPartitionId(BuildContext context, RuleBasePartitionId partitionId)
BaseNode
setPartitionId
in class BaseNode
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.