public class AlphaNode extends ObjectSource implements ObjectSinkNode
AlphaNodes
are nodes in the Rete
network used
to apply FieldConstraint<.code>s on asserted fact
objects where the FieldConstraint
s have no dependencies on any other of the facts in the current Rule
.
AlphaNodeFieldConstraint
,
Serialized FormalphaNodeHashingThreshold, declaredMask, inferredMask, sink, source
associations, hashcode, id, memoryId, partitionId, partitionsEnabled
Constructor and Description |
---|
AlphaNode() |
AlphaNode(int id,
AlphaNodeFieldConstraint constraint,
ObjectSource objectSource,
BuildContext context)
Construct an
AlphaNode with a unique id using the provided
FieldConstraint and the given ObjectSource . |
addObjectSink, doRemove, getKnowledgeBase, getObjectSinkPropagator, getObjectTypeNode, getParentObjectSource, initDeclaredMask, isInUse, networkUpdated, removeObjectSink, resetInferredMask, setObjectSinkPropagator, setParentObjectSource, setPartitionIdWithSinks, setSourcePartitionId, updateMask
addAssociation, addAssociation, getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionsEnabled, setStreamMode, thisNodeEquals
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setPartitionIdWithSinks
getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, isAssociatedWith, thisNodeEquals
public AlphaNode()
public AlphaNode(int id, AlphaNodeFieldConstraint constraint, ObjectSource objectSource, BuildContext context)
AlphaNode
with a unique id using the provided
FieldConstraint
and the given ObjectSource
.
Set the boolean flag to true if the node is supposed to have local
memory, or false otherwise. Memory is optional for AlphaNode
s
and is only of benefic when adding additional Rule
s at runtime.id
- Node's IDconstraint
- Node's constraintsobjectSource
- Node's object sourcepublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class ObjectSource
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class ObjectSource
IOException
public AlphaNodeFieldConstraint getConstraint()
FieldConstraint
FieldConstraint
public short getType()
getType
in interface NetworkNode
public void attach(BuildContext context)
BaseNode
ObjectSource
or TupleSource
public void setPartitionId(BuildContext context, RuleBasePartitionId partitionId)
BaseNode
setPartitionId
in class ObjectSource
public void assertObject(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory)
assertObject
in interface ObjectSink
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(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
updateSink
in class ObjectSource
protected boolean internalEquals(Object object)
internalEquals
in class BaseNode
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 BitMask calculateDeclaredMask(List<String> settableProperties)
calculateDeclaredMask
in class ObjectSource
public BitMask getDeclaredMask()
getDeclaredMask
in class ObjectSource
public BitMask getInferredMask()
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.