Package org.drools.core.reteoo
Class AccumulateNode
- java.lang.Object
-
- org.drools.core.common.BaseNode
-
- org.drools.core.reteoo.LeftTupleSource
-
- org.drools.core.reteoo.BetaNode
-
- org.drools.core.reteoo.AccumulateNode
-
- All Implemented Interfaces:
java.io.Serializable,org.drools.base.common.NetworkNode,MemoryFactory,LeftTupleNode,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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAccumulateNode.AccumulateContextstatic classAccumulateNode.AccumulateMemorystatic interfaceAccumulateNode.BaseAccumulationstatic classAccumulateNode.GroupByContextstatic classAccumulateNode.MultiAccumulateMemorystatic classAccumulateNode.SingleAccumulateMemory
-
Field Summary
Fields Modifier and Type Field Description protected org.drools.base.rule.Accumulateaccumulateprotected BetaConstraintsresultBinderprotected org.drools.base.rule.constraint.AlphaNodeFieldConstraint[]resultConstraints-
Fields inherited from class org.drools.core.reteoo.BetaNode
constraints, indexedUnificationJoin, isLogTraceEnabled, log, objectMemory, rightInput, rightInputIsRiaNode, tupleMemoryEnabled
-
Fields inherited from class org.drools.core.reteoo.LeftTupleSource
leftDeclaredMask, leftInferredMask, leftInput, leftNegativeMask, sink
-
Fields inherited from class org.drools.core.common.BaseNode
associations, hashcode, id, memoryId, partitionId
-
-
Constructor Summary
Constructors Constructor Description AccumulateNode()AccumulateNode(int id, LeftTupleSource leftInput, ObjectSource rightInput, org.drools.base.rule.constraint.AlphaNodeFieldConstraint[] resultConstraints, BetaConstraints sourceBinder, BetaConstraints resultBinder, org.drools.base.rule.Accumulate accumulate, BuildContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcalculateHashCode()LeftTuplecreateLeftTuple(InternalFactHandle factHandle, boolean leftTupleMemoryEnabled)LeftTuplecreateLeftTuple(InternalFactHandle factHandle, LeftTuple leftTuple, Sink sink)LeftTuplecreateLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, Sink sink, boolean leftTupleMemoryEnabled)LeftTuplecreateLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, Sink sink)LeftTuplecreateLeftTuple(LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled)MemorycreateMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator)Creates a BetaMemory for the BetaNode's memory.LeftTuplecreatePeer(LeftTuple original)InternalFactHandlecreateResultFactHandle(PropagationContext context, ReteEvaluator reteEvaluator, LeftTuple leftTuple, java.lang.Object result)voiddoAttach(BuildContext context)booleandoRemove(RuleRemovalContext context, ReteooBuilder builder)Removes the node from the network.booleanequals(java.lang.Object object)org.drools.base.rule.AccumulategetAccumulate()protected org.drools.base.base.ObjectTypegetObjectTypeForPropertyReactivity(LeftInputAdapterNode leftInput, org.drools.base.rule.Pattern pattern)BetaConstraintsgetResultBinder()org.drools.base.rule.constraint.AlphaNodeFieldConstraint[]getResultConstraints()shortgetType()voidmodifyRightTuple(RightTuple rightTuple, PropagationContext context, ReteEvaluator reteEvaluator)voidretractRightTuple(RightTuple rightTuple, PropagationContext pctx, ReteEvaluator reteEvaluator)-
Methods inherited from class org.drools.core.reteoo.BetaNode
assertObject, byPassModifyToBetaNode, createRightTuple, doDeleteRightTuple, doUpdateRightTuple, getBetaMemory, getBetaMemoryFromRightInput, getConstraints, getFirstLeftTuple, getFirstRightTuple, getFirstTuple, getLeftIterator, getNextLeftTupleSinkNode, getNextObjectSinkNode, getObjectTypeNode, getPreviousLeftTupleSinkNode, getPreviousObjectSinkNode, getRawConstraints, getRightDeclaredMask, getRightInferredMask, getRightInput, getRightInputOtnId, getRightIterator, getRightNegativeMask, getRules, getStartTuple, initDeclaredMask, initInferredMask, initInferredMask, isIndexedUnificationJoin, isLeftTupleMemoryEnabled, isObjectMemoryEnabled, isRightInputIsRiaNode, isRightInputPassive, modifyObject, networkUpdated, reorderRightTuple, setLeftListenedProperties, setNextLeftTupleSinkNode, setNextObjectSinkNode, setPartitionId, setPreviousLeftTupleSinkNode, setPreviousObjectSinkNode, setRightInput, setRightInputOtnId, toString, unwrapRightInput
-
Methods inherited from class org.drools.core.reteoo.LeftTupleSource
addTupleSink, addTupleSink, addTupleSink, getFirstLeftTupleSinkIgnoreRemoving, getLeftDeclaredMask, getLeftInferredMask, getLeftInputOtnId, getLeftInputPattern, getLeftNegativeMask, getLeftTupleSource, getObjectCount, getObjectType, getPathIndex, getSinkPropagator, initMasks, isInUse, removeTupleSink, setLeftInferredMask, setLeftInputOtnId, setLeftTupleSource, setNodeConstraintsPropertyReactiveMask, setObjectCount, setPartitionIdWithSinks, setSourcePartitionId, setSourcePartitionId
-
Methods inherited from class org.drools.core.common.BaseNode
addAssociatedTerminal, addAssociation, addAssociation, attach, getAssociatedRules, getAssociatedTerminalsSize, getAssociationsSize, getId, getMemoryId, getPartitionId, getSinks, hasAssociatedTerminal, hashCode, initMemoryId, isAssociatedWith, isStreamMode, remove, removeAssociatedTerminal, removeAssociation, setId, setStreamMode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleNode
getLeftTupleSource, getObjectCount, getPathIndex, getSinkPropagator, setObjectCount
-
Methods inherited from interface org.drools.core.reteoo.LeftTupleSink
getLeftInferredMask, getLeftInputOtnId, setLeftInputOtnId, setPartitionIdWithSinks
-
Methods inherited from interface org.drools.core.common.MemoryFactory
getMemoryId
-
Methods inherited from interface org.drools.base.common.NetworkNode
addAssociatedTerminal, getAssociatedRules, getAssociatedTerminalsSize, getId, getPartitionId, getSinks, hasAssociatedTerminal, isAssociatedWith, removeAssociatedTerminal
-
Methods inherited from interface org.drools.core.reteoo.ObjectSinkNode
setPartitionIdWithSinks
-
-
-
-
Field Detail
-
accumulate
protected org.drools.base.rule.Accumulate accumulate
-
resultConstraints
protected org.drools.base.rule.constraint.AlphaNodeFieldConstraint[] resultConstraints
-
resultBinder
protected BetaConstraints resultBinder
-
-
Constructor Detail
-
AccumulateNode
public AccumulateNode()
-
AccumulateNode
public AccumulateNode(int id, LeftTupleSource leftInput, ObjectSource rightInput, org.drools.base.rule.constraint.AlphaNodeFieldConstraint[] resultConstraints, BetaConstraints sourceBinder, BetaConstraints resultBinder, org.drools.base.rule.Accumulate accumulate, BuildContext context)
-
-
Method Detail
-
getObjectTypeForPropertyReactivity
protected org.drools.base.base.ObjectType getObjectTypeForPropertyReactivity(LeftInputAdapterNode leftInput, org.drools.base.rule.Pattern pattern)
- Overrides:
getObjectTypeForPropertyReactivityin classLeftTupleSource
-
getType
public short getType()
- Specified by:
getTypein interfaceorg.drools.base.common.NetworkNode- Specified by:
getTypein classLeftTupleSource
-
getAccumulate
public org.drools.base.rule.Accumulate getAccumulate()
-
getResultConstraints
public org.drools.base.rule.constraint.AlphaNodeFieldConstraint[] getResultConstraints()
-
getResultBinder
public BetaConstraints getResultBinder()
-
createResultFactHandle
public InternalFactHandle createResultFactHandle(PropagationContext context, ReteEvaluator reteEvaluator, LeftTuple leftTuple, java.lang.Object result)
-
doAttach
public void doAttach(BuildContext context)
-
calculateHashCode
protected int calculateHashCode()
- Overrides:
calculateHashCodein classBetaNode
-
createMemory
public Memory createMemory(RuleBaseConfiguration config, ReteEvaluator reteEvaluator)
Creates a BetaMemory for the BetaNode's memory.- Specified by:
createMemoryin interfaceMemoryFactory- Overrides:
createMemoryin classBetaNode
-
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle, boolean leftTupleMemoryEnabled)
-
createLeftTuple
public LeftTuple createLeftTuple(InternalFactHandle factHandle, LeftTuple leftTuple, Sink sink)
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, Sink sink, PropagationContext pctx, boolean leftTupleMemoryEnabled)
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, Sink sink)
-
createLeftTuple
public LeftTuple createLeftTuple(LeftTuple leftTuple, RightTuple rightTuple, LeftTuple currentLeftChild, LeftTuple currentRightChild, Sink sink, boolean leftTupleMemoryEnabled)
-
createPeer
public LeftTuple createPeer(LeftTuple original)
- Specified by:
createPeerin interfaceLeftTupleSink- Specified by:
createPeerin classLeftTupleSource
-
retractRightTuple
public void retractRightTuple(RightTuple rightTuple, PropagationContext pctx, ReteEvaluator reteEvaluator)
-
modifyRightTuple
public void modifyRightTuple(RightTuple rightTuple, PropagationContext context, ReteEvaluator reteEvaluator)
-
doRemove
public boolean doRemove(RuleRemovalContext context, ReteooBuilder builder)
Description copied from class:BaseNodeRemoves the node from the network. Usually from the parentObjectSourceorTupleSource
-
-