public static class Accumulator.SafeAccumulator extends Object implements Accumulator, Serializable
Accumulator.SafeAccumulator| Constructor and Description |
|---|
SafeAccumulator(Accumulator delegate) |
| Modifier and Type | Method and Description |
|---|---|
Object |
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
|
Object |
createContext()
Creates the context object for an accumulator session.
|
Object |
createWorkingMemoryContext()
Creates and return a context object for each working memory instance
|
Object |
getResult(Object workingMemoryContext,
Object context,
Tuple leftTuple,
Declaration[] declarations,
WorkingMemory workingMemory)
Gets the result of the accummulation
|
Object |
init(Object workingMemoryContext,
Object context,
Tuple leftTuple,
Declaration[] declarations,
WorkingMemory workingMemory)
Executes the initialization block of code
|
boolean |
supportsReverse()
Returns true if this accumulator supports operation reversal
|
boolean |
tryReverse(Object workingMemoryContext,
Object context,
Tuple leftTuple,
InternalFactHandle handle,
Object value,
Declaration[] declarations,
Declaration[] innerDeclarations,
WorkingMemory workingMemory)
Reverses the accumulate action for the given fact handle
|
boolean |
wrapsCompiledInvoker() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisCompiledInvokerpublic SafeAccumulator(Accumulator delegate)
public Object createWorkingMemoryContext()
AccumulatorcreateWorkingMemoryContext in interface Accumulatorpublic Object createContext()
AccumulatorcreateContext in interface Accumulatorpublic Object init(Object workingMemoryContext, Object context, Tuple leftTuple, Declaration[] declarations, WorkingMemory workingMemory)
Accumulatorinit in interface AccumulatorleftTuple - tuple causing the rule firedeclarations - previous declarationspublic Object accumulate(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, Declaration[] declarations, Declaration[] innerDeclarations, WorkingMemory workingMemory)
Accumulatoraccumulate in interface Accumulatorpublic boolean supportsReverse()
AccumulatorsupportsReverse in interface Accumulatorpublic boolean tryReverse(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, Object value, Declaration[] declarations, Declaration[] innerDeclarations, WorkingMemory workingMemory)
AccumulatortryReverse in interface Accumulatorpublic Object getResult(Object workingMemoryContext, Object context, Tuple leftTuple, Declaration[] declarations, WorkingMemory workingMemory)
AccumulatorgetResult in interface Accumulatorpublic boolean wrapsCompiledInvoker()
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.