org.drools.reteoo
Class AccumulateNode
java.lang.Object
org.drools.common.BaseNode
org.drools.reteoo.LeftTupleSource
org.drools.reteoo.BetaNode
org.drools.reteoo.AccumulateNode
- All Implemented Interfaces:
- Externalizable, Serializable, NetworkNode, NodeMemory, LeftTupleSink, LeftTupleSinkNode, ObjectSink, ObjectSinkNode, RightTupleSink, Sink
public class AccumulateNode
- extends BetaNode
AccumulateNode
A beta node capable of doing accumulate logic.
Created: 04/06/2006
- Version:
- $Id$
- See Also:
- Serialized Form
Method Summary |
void |
assertLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
Assert a new ReteTuple . |
void |
assertObject(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
Object |
createMemory(RuleBaseConfiguration config)
Creates a BetaMemory for the BetaNode's memory. |
protected void |
doRemove(InternalWorkingMemory workingMemory,
AccumulateNode.AccumulateMemory memory)
|
boolean |
equals(Object object)
|
short |
getType()
|
int |
hashCode()
The hashCode return is simply the unique id of the node. |
void |
modifyLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
modifyRightTuple(RightTuple rightTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
readExternal(ObjectInput in)
|
void |
retractLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
retractRightTuple(RightTuple rightTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
protected LeftTuple[] |
splitList(LeftTuple parent,
AccumulateNode.AccumulateContext accctx,
boolean isUpdatingSink)
|
void |
updateSink(LeftTupleSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class org.drools.reteoo.BetaNode |
attach, attach, createRightTuple, doRemove, dumpMemory, getBehaviors, getConstraints, getFirstRightTuple, getNextLeftTupleSinkNode, getNextObjectSinkNode, getObjectTypeNode, getPreviousLeftTupleSinkNode, getPreviousObjectSinkNode, getRawConstraints, getRightIterator, getRules, isConcurrentRightTupleMemory, isLeftTupleMemoryEnabled, isObjectMemoryEnabled, leftUnlinked, modifyLeftTuple, modifyObject, networkUpdated, rightUnlinked, setConcurrentRightTupleMemory, setLeftTupleMemoryEnabled, setNextLeftTupleSinkNode, setNextObjectSinkNode, setObjectMemoryEnabled, setPreviousLeftTupleSinkNode, setPreviousObjectSinkNode, setUnificationJoin, toString |
AccumulateNode
public AccumulateNode()
AccumulateNode
public AccumulateNode(int id,
LeftTupleSource leftInput,
ObjectSource rightInput,
AlphaNodeFieldConstraint[] resultConstraints,
BetaConstraints sourceBinder,
BetaConstraints resultBinder,
Behavior[] behaviors,
Accumulate accumulate,
boolean unwrapRightObject,
BuildContext context)
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal
in interface Externalizable
- Overrides:
readExternal
in class BetaNode
- Throws:
IOException
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Overrides:
writeExternal
in class BetaNode
- Throws:
IOException
assertLeftTuple
public void assertLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
- Description copied from interface:
LeftTupleSink
- Assert a new
ReteTuple
.
- Parameters:
leftTuple
- The ReteTuple
to propagate.context
- The PropagationContext
of the WorkingMemory actionworkingMemory
- the WorkingMemory
session.
retractLeftTuple
public void retractLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
assertObject
public void assertObject(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory)
retractRightTuple
public void retractRightTuple(RightTuple rightTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
modifyLeftTuple
public void modifyLeftTuple(LeftTuple leftTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
modifyRightTuple
public void modifyRightTuple(RightTuple rightTuple,
PropagationContext context,
InternalWorkingMemory workingMemory)
updateSink
public void updateSink(LeftTupleSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
- Specified by:
updateSink
in class LeftTupleSource
doRemove
protected void doRemove(InternalWorkingMemory workingMemory,
AccumulateNode.AccumulateMemory memory)
hashCode
public int hashCode()
- Description copied from class:
BaseNode
- The hashCode return is simply the unique id of the node. It is expected that base classes will also implement equals(Object object).
- Overrides:
hashCode
in class BetaNode
equals
public boolean equals(Object object)
- Overrides:
equals
in class BetaNode
createMemory
public Object createMemory(RuleBaseConfiguration config)
- Creates a BetaMemory for the BetaNode's memory.
- Specified by:
createMemory
in interface NodeMemory
- Overrides:
createMemory
in class BetaNode
getType
public short getType()
splitList
protected LeftTuple[] splitList(LeftTuple parent,
AccumulateNode.AccumulateContext accctx,
boolean isUpdatingSink)
Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.