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 FieldConstraints have no dependencies on any other of the facts in the current Rule.AlphaNodeFieldConstraint,
Serialized FormalphaNodeHashingThreshold, declaredMask, inferredMask, sink, sourceassociations, 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, updateMaskaddAssociation, addAssociation, getAssociatedRules, getAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociation, setId, setPartitionsEnabled, setStreamMode, thisNodeEqualsclone, finalize, getClass, notify, notifyAll, wait, wait, waitsetPartitionIdWithSinksgetAssociatedRuleSize, getAssociationsSize, getAssociationsSize, getId, getPartitionId, isAssociatedWith, thisNodeEqualspublic 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 AlphaNodes
and is only of benefic when adding additional Rules at runtime.id - Node's IDconstraint - Node's constraintsobjectSource - Node's object sourcepublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class ObjectSourceIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class ObjectSourceIOExceptionpublic AlphaNodeFieldConstraint getConstraint()
FieldConstraintFieldConstraintpublic short getType()
getType in interface NetworkNodepublic void attach(BuildContext context)
BaseNodeObjectSource or TupleSourcepublic void setPartitionId(BuildContext context, RuleBasePartitionId partitionId)
BaseNodesetPartitionId in class ObjectSourcepublic void assertObject(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory)
assertObject in interface ObjectSinkpublic void modifyObject(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory)
modifyObject in interface ObjectSinkpublic void byPassModifyToBetaNode(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory)
byPassModifyToBetaNode in interface ObjectSinkpublic void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
updateSink in class ObjectSourceprotected boolean internalEquals(Object object)
internalEquals in class BaseNodepublic 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 BitMask calculateDeclaredMask(Class modifiedClass, List<String> settableProperties)
calculateDeclaredMask in class ObjectSourcepublic BitMask getDeclaredMask()
getDeclaredMask in class ObjectSourcepublic BitMask getInferredMask()
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.