public interface Accumulator extends Invoker
Modifier and Type | Interface and Description |
---|---|
static class |
Accumulator.SafeAccumulator
This class is used as a wrapper delegate when a security
policy is in place.
|
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
|
Object |
getResult(Object workingMemoryContext,
Object context,
Tuple leftTuple,
Declaration[] declarations,
WorkingMemory workingMemory)
Gets the result of the accummulation
|
void |
init(Object workingMemoryContext,
Object context,
Tuple leftTuple,
Declaration[] declarations,
WorkingMemory workingMemory)
Executes the initialization block of code
|
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
|
Object createWorkingMemoryContext()
Serializable createContext()
void init(Object workingMemoryContext, Object context, Tuple leftTuple, Declaration[] declarations, WorkingMemory workingMemory) throws Exception
leftTuple
- tuple causing the rule firedeclarations
- previous declarationsworkingMemory
- Exception
void accumulate(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, Declaration[] declarations, Declaration[] innerDeclarations, WorkingMemory workingMemory) throws Exception
leftTuple
- handle
- declarations
- innerDeclarations
- workingMemory
- Exception
boolean supportsReverse()
void reverse(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, Declaration[] declarations, Declaration[] innerDeclarations, WorkingMemory workingMemory) throws Exception
context
- leftTuple
- handle
- declarations
- innerDeclarations
- workingMemory
- Exception
Object getResult(Object workingMemoryContext, Object context, Tuple leftTuple, Declaration[] declarations, WorkingMemory workingMemory) throws Exception
leftTuple
- declarations
- workingMemory
- Exception
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.