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 |
protected BitMask |
sinkMask |
leftDeclaredMask, leftInferredMask, leftInput, leftNegativeMask, sinkassociations, 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, getObjectCount, getObjectType, getObjectTypeForPropertyReactivity, getPathIndex, getSinkPropagator, initDeclaredMask, initInferredMask, initMasks, isInUse, removeTupleSink, setLeftInferredMask, setLeftInputOtnId, setLeftListenedProperties, setLeftTupleSource, setNodeConstraintsPropertyReactiveMask, setObjectCount, setPartitionIdWithSinks, setSourcePartitionIdaddAssociation, addAssociation, attach, getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionsEnabled, setStreamMode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitsetPartitionIdWithSinksgetAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, isAssociatedWithgetMemoryIdprotected static final transient org.slf4j.Logger log
protected BitMask sinkMask
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 ExternalizablereadExternal in class LeftTupleSourceIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class LeftTupleSourceIOExceptionpublic ObjectSource getObjectSource()
public short getType()
getType in interface NetworkNodegetType in class LeftTupleSourcepublic boolean isLeftTupleMemoryEnabled()
isLeftTupleMemoryEnabled in class LeftTupleSourcepublic ObjectSource getParentObjectSource()
public void doAttach(BuildContext context)
public void networkUpdated(UpdateContext updateContext)
BaseNodenetworkUpdated in class BaseNodepublic void assertObject(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory)
assertObject in interface ObjectSinkpublic 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 ObjectSinkprotected LeftTuple processDeletesFromModify(ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory, ObjectTypeNode.Id otnId)
public void byPassModifyToBetaNode(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory)
byPassModifyToBetaNode in interface ObjectSinkprotected boolean doRemove(RuleRemovalContext context, ReteooBuilder builder)
BaseNodeObjectSource or TupleSourcepublic 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 ObjectTypeNode getObjectTypeNode()
getObjectTypeNode in class BaseNodepublic LeftInputAdapterNode.LiaNodeMemory createMemory(RuleBaseConfiguration config, InternalWorkingMemory wm)
createMemory in interface MemoryFactory<LeftInputAdapterNode.LiaNodeMemory>public void setSourcePartitionId(BuildContext context, RuleBasePartitionId partitionId)
setSourcePartitionId in class LeftTupleSourcepublic void setPartitionId(BuildContext context, RuleBasePartitionId partitionId)
BaseNodesetPartitionId in class BaseNodepublic boolean isTerminal()
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.