public class AlphaNode extends AbstractNode implements IObjectConsumerNode, IObjectSourceNode
| Modifier and Type | Field and Description |
|---|---|
protected IConstraintEvaluator[] |
evaluators
The constraint evaluator.
|
protected AttributeSet |
indirects
The set of indirect attributes.
|
protected IObjectConsumerNode[] |
oconsumers
The object consumers.
|
protected IObjectSourceNode |
osource
The object source.
|
protected AttributeSet |
relevants
The set of relevant attributes.
|
clones, nodeid| Constructor and Description |
|---|
AlphaNode(int nodeid,
IConstraintEvaluator[] evaluators)
Create a new node.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObject(java.lang.Object object,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Send a new object to this node.
|
void |
addObjectConsumer(IObjectConsumerNode node)
Add an object consumer node.
|
protected boolean |
checkConstraints(java.lang.Object right,
IOAVState state)
Check the constraints with respect
to the object.
|
java.lang.Object |
createNodeMemory(IOAVState state)
Create the node memory.
|
protected void |
doClone(java.lang.Object theclone)
Do clone makes a deep clone without regarding cycles.
|
IConstraintEvaluator[] |
getConstraintEvaluators()
Get the constraint evaluators.
|
AttributeSet |
getIndirectAttributes()
Get the set of indirect attribute types.
|
java.util.Collection |
getNodeMemory(ReteMemory mem)
Get the memory for this node.
|
IObjectConsumerNode[] |
getObjectConsumers()
Get all object consumer nodes.
|
IObjectSourceNode |
getObjectSource()
Get the object source of this node.
|
AttributeSet |
getRelevantAttributes()
Get the set of relevant attribute types.
|
boolean |
isAffected(OAVAttributeType attr)
Test if the node is affected from a modification.
|
void |
modifyIndirectObject(java.lang.Object id,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Propagate an indirect object change to this node.
|
void |
modifyObject(java.lang.Object object,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Propagate an object change to this node.
|
protected void |
propagateAdditionToObjectConsumers(java.lang.Object object,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Propagate a new object to all object consumers.
|
protected void |
propagateModificationToObjectConsumers(java.lang.Object object,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Propagate a modified object to all object consumers.
|
protected void |
propagateRemovalToObjectConsumers(java.lang.Object object,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Propagate a removed object to all object consumers.
|
void |
removeObject(java.lang.Object object,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Send a removed object to this node.
|
void |
removeObjectConsumer(IObjectConsumerNode node)
Remove an object consumer.
|
void |
setObjectSource(IObjectSourceNode node)
Set the object source of this node.
|
java.lang.String |
toString()
Get the string representation.
|
checkNodeConsistency, clone, equals, getNodeId, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcheckNodeConsistency, clone, getNodeIdprotected IObjectSourceNode osource
protected IObjectConsumerNode[] oconsumers
protected IConstraintEvaluator[] evaluators
protected volatile AttributeSet relevants
protected volatile AttributeSet indirects
public AlphaNode(int nodeid,
IConstraintEvaluator[] evaluators)
evaluators - The evaluators.public void addObject(java.lang.Object object,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
addObject in interface IObjectConsumerNodeobject - The object.public void removeObject(java.lang.Object object,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
removeObject in interface IObjectConsumerNodeobject - The object.public void modifyObject(java.lang.Object object,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
modifyObject in interface IObjectConsumerNodeobject - The new object.public void modifyIndirectObject(java.lang.Object id,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
modifyIndirectObject in interface INodeid - The changed object.public void setObjectSource(IObjectSourceNode node)
setObjectSource in interface IObjectConsumerNodenode - The object source node.public IObjectSourceNode getObjectSource()
getObjectSource in interface IObjectConsumerNodepublic void addObjectConsumer(IObjectConsumerNode node)
addObjectConsumer in interface IObjectSourceNodenode - A new consumer node.public void removeObjectConsumer(IObjectConsumerNode node)
removeObjectConsumer in interface IObjectSourceNodenode - The consumer node.public java.util.Collection getNodeMemory(ReteMemory mem)
getNodeMemory in interface INodegetNodeMemory in interface IObjectSourceNodepublic IObjectConsumerNode[] getObjectConsumers()
getObjectConsumers in interface IObjectSourceNodepublic java.lang.Object createNodeMemory(IOAVState state)
createNodeMemory in interface INodestate - The state.protected void propagateAdditionToObjectConsumers(java.lang.Object object,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
object - The new object.protected void propagateRemovalToObjectConsumers(java.lang.Object object,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
object - The new object.protected void propagateModificationToObjectConsumers(java.lang.Object object,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
object - The new object.protected boolean checkConstraints(java.lang.Object right,
IOAVState state)
public boolean isAffected(OAVAttributeType attr)
type - The attribute type.public AttributeSet getRelevantAttributes()
getRelevantAttributes in interface INodepublic AttributeSet getIndirectAttributes()
getIndirectAttributes in interface INodepublic java.lang.String toString()
toString in class AbstractNodepublic IConstraintEvaluator[] getConstraintEvaluators()
protected void doClone(java.lang.Object theclone)
doClone in class AbstractNodetheclone - The clone.