public class MVELAccumulator extends Object implements MVELCompileable, MvelAccumulator, Externalizable
Accumulator.SafeAccumulator
Constructor and Description |
---|
MVELAccumulator() |
MVELAccumulator(MVELCompilationUnit initUnit,
MVELCompilationUnit actionUnit,
MVELCompilationUnit reverseUnit,
MVELCompilationUnit resultUnit) |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(Object workingMemoryContext,
Object context,
Tuple tuple,
InternalFactHandle handle,
Declaration[] declarations,
Declaration[] innerDeclarations,
WorkingMemory workingMemory)
Executes the accumulate (action) code for the given fact handle
|
void |
compile(MVELDialectRuntimeData runtimeData) |
void |
compile(MVELDialectRuntimeData runtimeData,
RuleImpl rule) |
Serializable |
createContext()
Creates the context object for an accumulator session.
|
Object |
createWorkingMemoryContext()
Creates and return a context object for each working memory instance
|
Declaration[] |
getRequiredDeclarations() |
Object |
getResult(Object workingMemoryContext,
Object context,
Tuple tuple,
Declaration[] declarations,
WorkingMemory workingMemory)
Gets the result of the accummulation
|
void |
init(Object workingMemoryContext,
Object context,
Tuple tuple,
Declaration[] declarations,
WorkingMemory workingMemory)
Executes the initialization block of code
|
void |
readExternal(ObjectInput in) |
void |
reverse(Object workingMemoryContext,
Object context,
Tuple leftTuple,
InternalFactHandle handle,
Declaration[] declarations,
Declaration[] innerDeclarations,
WorkingMemory workingMemory)
Reverses the accumulate action for the given fact handle
|
boolean |
supportsReverse()
Returns true if this accumulator supports operation reversal
|
void |
writeExternal(ObjectOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isCompiledInvoker
public MVELAccumulator()
public MVELAccumulator(MVELCompilationUnit initUnit, MVELCompilationUnit actionUnit, MVELCompilationUnit reverseUnit, MVELCompilationUnit resultUnit)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void compile(MVELDialectRuntimeData runtimeData)
compile
in interface MVELCompileable
public void compile(MVELDialectRuntimeData runtimeData, RuleImpl rule)
compile
in interface MVELCompileable
public Serializable createContext()
Accumulator
createContext
in interface Accumulator
public void init(Object workingMemoryContext, Object context, Tuple tuple, Declaration[] declarations, WorkingMemory workingMemory) throws Exception
Accumulator
init
in interface Accumulator
tuple
- tuple causing the rule firedeclarations
- previous declarationsException
public void accumulate(Object workingMemoryContext, Object context, Tuple tuple, InternalFactHandle handle, Declaration[] declarations, Declaration[] innerDeclarations, WorkingMemory workingMemory) throws Exception
Accumulator
accumulate
in interface Accumulator
Exception
public void reverse(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, Declaration[] declarations, Declaration[] innerDeclarations, WorkingMemory workingMemory) throws Exception
Accumulator
reverse
in interface Accumulator
Exception
public Object getResult(Object workingMemoryContext, Object context, Tuple tuple, Declaration[] declarations, WorkingMemory workingMemory) throws Exception
Accumulator
getResult
in interface Accumulator
Exception
public boolean supportsReverse()
Accumulator
supportsReverse
in interface Accumulator
public Object createWorkingMemoryContext()
Accumulator
createWorkingMemoryContext
in interface Accumulator
public Declaration[] getRequiredDeclarations()
getRequiredDeclarations
in interface MvelAccumulator
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.