public class JavaAccumulatorFunctionExecutor extends Object implements Accumulator, Externalizable, Wireable
| Modifier and Type | Class and Description |
|---|---|
static class |
JavaAccumulatorFunctionExecutor.JavaAccumulatorFunctionContext |
Accumulator.SafeAccumulatorWireable.Immutable| Constructor and Description |
|---|
JavaAccumulatorFunctionExecutor() |
JavaAccumulatorFunctionExecutor(org.kie.api.runtime.rule.AccumulateFunction function) |
| Modifier and Type | Method and Description |
|---|---|
void |
accumulate(Object workingMemoryContext,
Object context,
Tuple leftTuple,
InternalFactHandle handle,
Declaration[] declarations,
Declaration[] innerDeclarations,
WorkingMemory workingMemory)
Executes the accumulate (action) code for the given fact handle
|
Serializable |
createContext()
Creates the context object for an accumulator session.
|
Object |
createWorkingMemoryContext()
Creates and return a context object for each working memory instance
|
boolean |
equals(Object o) |
ReturnValueExpression |
getExpression() |
Object |
getResult(Object workingMemoryContext,
Object context,
Tuple leftTuple,
Declaration[] declarations,
WorkingMemory workingMemory)
Gets the result of the accummulation
|
int |
hashCode() |
void |
init(Object workingMemoryContext,
Object context,
Tuple leftTuple,
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
|
void |
setExpression(ReturnValueExpression expression) |
boolean |
supportsReverse()
Returns true if this accumulator supports operation reversal
|
void |
wire(Object object) |
void |
writeExternal(ObjectOutput out) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisCompiledInvokerpublic JavaAccumulatorFunctionExecutor()
public JavaAccumulatorFunctionExecutor(org.kie.api.runtime.rule.AccumulateFunction function)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic Serializable createContext()
AccumulatorcreateContext in interface Accumulatorpublic void init(Object workingMemoryContext, Object context, Tuple leftTuple, Declaration[] declarations, WorkingMemory workingMemory) throws Exception
Accumulatorinit in interface AccumulatorleftTuple - tuple causing the rule firedeclarations - previous declarationsExceptionpublic void accumulate(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, Declaration[] declarations, Declaration[] innerDeclarations, WorkingMemory workingMemory) throws Exception
Accumulatoraccumulate in interface AccumulatorExceptionpublic void reverse(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, Declaration[] declarations, Declaration[] innerDeclarations, WorkingMemory workingMemory) throws Exception
Accumulatorreverse in interface AccumulatorExceptionpublic Object getResult(Object workingMemoryContext, Object context, Tuple leftTuple, Declaration[] declarations, WorkingMemory workingMemory) throws Exception
AccumulatorgetResult in interface AccumulatorExceptionpublic boolean supportsReverse()
AccumulatorsupportsReverse in interface Accumulatorpublic ReturnValueExpression getExpression()
public void setExpression(ReturnValueExpression expression)
public Object createWorkingMemoryContext()
AccumulatorcreateWorkingMemoryContext in interface AccumulatorCopyright © 2001–2020 JBoss by Red Hat. All rights reserved.