Package org.drools.core.rule
Class MultiAccumulate
- java.lang.Object
-
- org.drools.core.rule.ConditionalElement
-
- org.drools.core.rule.Accumulate
-
- org.drools.core.rule.MultiAccumulate
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Cloneable
,PatternSource
,RuleConditionElement
,RuleComponent
public class MultiAccumulate extends Accumulate
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MultiAccumulate.Wirer
-
Field Summary
-
Fields inherited from class org.drools.core.rule.Accumulate
cloned, innerDeclarationCache, requiredDeclarations, source
-
-
Constructor Summary
Constructors Constructor Description MultiAccumulate()
MultiAccumulate(RuleConditionElement source, Declaration[] requiredDeclarations, Accumulator[] accumulators, int arraySize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
accumulate(Object workingMemoryContext, Object context, Tuple match, InternalFactHandle handle, WorkingMemory workingMemory)
Executes the accumulate (action) code for the given fact handleObject
accumulate(Object workingMemoryContext, Tuple match, InternalFactHandle childHandle, AccumulateNode.GroupByContext groupByContext, TupleList<AccumulateNode.AccumulateContextEntry> tupleList, WorkingMemory wm)
MultiAccumulate
clone()
Returns a clone from itselfObject[]
createFunctionContext()
Object[]
createWorkingMemoryContext()
boolean
equals(Object obj)
Accumulator[]
getAccumulators()
Object[]
getResult(Object workingMemoryContext, Object context, Tuple leftTuple, WorkingMemory workingMemory)
Gets the result of the accumulationint
hashCode()
Object
init(Object workingMemoryContext, Object accContext, Object funcContext, Tuple leftTuple, WorkingMemory workingMemory)
Executes the initialization block of codeboolean
isMultiFunction()
void
readExternal(ObjectInput in)
void
replaceAccumulatorDeclaration(Declaration declaration, Declaration resolved)
boolean
supportsReverse()
Returns true if this accumulate supports reverseboolean
tryReverse(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, RightTuple rightParent, LeftTuple match, WorkingMemory workingMemory)
Executes the reverse (action) code for the given fact handlevoid
writeExternal(ObjectOutput out)
-
Methods inherited from class org.drools.core.rule.Accumulate
getInnerDeclarationCache, getInnerDeclarations, getNestedElements, getOuterDeclarations, getRequiredDeclarations, getSource, hasRequiredDeclarations, isGroupBy, isPatternScopeDelimiter, registerClone, replaceDeclaration, requiresLeftActivation, resolveDeclaration
-
-
-
-
Constructor Detail
-
MultiAccumulate
public MultiAccumulate()
-
MultiAccumulate
public MultiAccumulate(RuleConditionElement source, Declaration[] requiredDeclarations, Accumulator[] accumulators, int arraySize)
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classAccumulate
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classAccumulate
- Throws:
IOException
-
isMultiFunction
public boolean isMultiFunction()
- Specified by:
isMultiFunction
in classAccumulate
-
getAccumulators
public Accumulator[] getAccumulators()
- Specified by:
getAccumulators
in classAccumulate
-
createFunctionContext
public Object[] createFunctionContext()
- Specified by:
createFunctionContext
in classAccumulate
-
init
public Object init(Object workingMemoryContext, Object accContext, Object funcContext, Tuple leftTuple, WorkingMemory workingMemory)
Description copied from class:Accumulate
Executes the initialization block of code- Specified by:
init
in classAccumulate
-
accumulate
public Object accumulate(Object workingMemoryContext, Object context, Tuple match, InternalFactHandle handle, WorkingMemory workingMemory)
Description copied from class:Accumulate
Executes the accumulate (action) code for the given fact handle- Specified by:
accumulate
in classAccumulate
-
accumulate
public Object accumulate(Object workingMemoryContext, Tuple match, InternalFactHandle childHandle, AccumulateNode.GroupByContext groupByContext, TupleList<AccumulateNode.AccumulateContextEntry> tupleList, WorkingMemory wm)
- Specified by:
accumulate
in classAccumulate
-
tryReverse
public boolean tryReverse(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, RightTuple rightParent, LeftTuple match, WorkingMemory workingMemory)
Description copied from class:Accumulate
Executes the reverse (action) code for the given fact handle- Specified by:
tryReverse
in classAccumulate
-
supportsReverse
public boolean supportsReverse()
Description copied from class:Accumulate
Returns true if this accumulate supports reverse- Specified by:
supportsReverse
in classAccumulate
-
getResult
public Object[] getResult(Object workingMemoryContext, Object context, Tuple leftTuple, WorkingMemory workingMemory)
Description copied from class:Accumulate
Gets the result of the accumulation- Specified by:
getResult
in classAccumulate
-
replaceAccumulatorDeclaration
public void replaceAccumulatorDeclaration(Declaration declaration, Declaration resolved)
- Specified by:
replaceAccumulatorDeclaration
in classAccumulate
-
clone
public MultiAccumulate clone()
Description copied from interface:RuleConditionElement
Returns a clone from itself- Specified by:
clone
in interfaceRuleConditionElement
- Specified by:
clone
in classAccumulate
- Returns:
-
createWorkingMemoryContext
public Object[] createWorkingMemoryContext()
- Specified by:
createWorkingMemoryContext
in classAccumulate
-
-