public abstract class AbstractTerminalNode extends BaseNode implements TerminalNode, Externalizable
associations, id, partitionId, partitionsEnabled
Constructor and Description |
---|
AbstractTerminalNode() |
AbstractTerminalNode(int id,
RuleBasePartitionId partitionId,
boolean partitionsEnabled,
LeftTupleSource source) |
Modifier and Type | Method and Description |
---|---|
PathMemory |
createMemory(RuleBaseConfiguration config,
InternalWorkingMemory wm) |
LeftTuple |
createPeer(LeftTuple original) |
protected boolean |
doRemove(RuleRemovalContext context,
ReteooBuilder builder,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network.
|
BitMask |
getDeclaredMask() |
BitMask |
getInferredMask() |
BitMask |
getLeftInferredMask() |
LeftTupleSource |
getLeftTupleSource() |
BitMask |
getNegativeMask() |
abstract RuleImpl |
getRule() |
void |
initDeclaredMask(BuildContext context) |
void |
initInferredMask() |
static void |
initPathMemory(PathMemory pmem,
LeftTupleSource tupleSource,
LeftTupleSource startTupleSource,
InternalWorkingMemory wm,
RuleImpl removingRule)
Creates and return the node memory
|
boolean |
isInUse()
Returns true in case the current node is in use (is referenced by any other node)
|
boolean |
isLeftTupleMemoryEnabled() |
void |
modifyLeftTuple(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 |
setDeclaredMask(BitMask mask) |
void |
setInferredMask(BitMask mask) |
void |
setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled) |
void |
setNegativeMask(BitMask mask) |
LeftTupleSource |
unwrapTupleSource() |
void |
writeExternal(ObjectOutput out) |
addAssociation, addAssociation, attach, getAssociationsSize, getAssociationsSize, getId, getPartitionId, hashCode, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionId, setStreamMode, toString
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
getAllDeclarations, getRequiredDeclarations, getSalienceDeclarations, getSubRule, getTimerDeclarations, isFireDirect
getNextLeftTupleSinkNode, getPreviousLeftTupleSinkNode, setNextLeftTupleSinkNode, setPreviousLeftTupleSinkNode
assertLeftTuple, createLeftTuple, createLeftTuple, createLeftTuple, createLeftTuple, createLeftTuple, getLeftInputOtnId, modifyLeftTuple, retractLeftTuple, setLeftInputOtnId
getAssociationsSize, getAssociationsSize, getId, getPartitionId, isAssociatedWith
getId
public AbstractTerminalNode()
public AbstractTerminalNode(int id, RuleBasePartitionId partitionId, boolean partitionsEnabled, LeftTupleSource source)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class BaseNode
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class BaseNode
IOException
public void initDeclaredMask(BuildContext context)
public void initInferredMask()
initInferredMask
in interface TerminalNode
public LeftTupleSource unwrapTupleSource()
unwrapTupleSource
in interface TerminalNode
public void modifyLeftTuple(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory)
modifyLeftTuple
in interface LeftTupleSink
public abstract RuleImpl getRule()
getRule
in interface TerminalNode
public PathMemory createMemory(RuleBaseConfiguration config, InternalWorkingMemory wm)
createMemory
in interface MemoryFactory<PathMemory>
public static void initPathMemory(PathMemory pmem, LeftTupleSource tupleSource, LeftTupleSource startTupleSource, InternalWorkingMemory wm, RuleImpl removingRule)
public LeftTuple createPeer(LeftTuple original)
createPeer
in interface LeftTupleSink
protected boolean doRemove(RuleRemovalContext context, ReteooBuilder builder, InternalWorkingMemory[] workingMemories)
BaseNode
ObjectSource
or TupleSource
public LeftTupleSource getLeftTupleSource()
getLeftTupleSource
in interface LeftTupleSink
getLeftTupleSource
in interface TerminalNode
public BitMask getDeclaredMask()
getDeclaredMask
in interface TerminalNode
public BitMask getInferredMask()
getInferredMask
in interface TerminalNode
public BitMask getLeftInferredMask()
getLeftInferredMask
in interface LeftTupleSink
public void setDeclaredMask(BitMask mask)
setDeclaredMask
in interface TerminalNode
public void setInferredMask(BitMask mask)
setInferredMask
in interface TerminalNode
public BitMask getNegativeMask()
getNegativeMask
in interface TerminalNode
public void setNegativeMask(BitMask mask)
setNegativeMask
in interface TerminalNode
public void networkUpdated(UpdateContext updateContext)
BaseNode
networkUpdated
in class BaseNode
public boolean isInUse()
BaseNode
public boolean isLeftTupleMemoryEnabled()
isLeftTupleMemoryEnabled
in interface LeftTupleSink
public void setLeftTupleMemoryEnabled(boolean tupleMemoryEnabled)
setLeftTupleMemoryEnabled
in interface LeftTupleSink
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.