public abstract class Accumulate extends ConditionalElement implements PatternSource
| Modifier and Type | Field and Description |
|---|---|
protected List<Accumulate> |
cloned |
protected Declaration[] |
innerDeclarationCache |
protected Declaration[] |
requiredDeclarations |
protected RuleConditionElement |
source |
| Constructor and Description |
|---|
Accumulate() |
Accumulate(RuleConditionElement source,
Declaration[] requiredDeclarations) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
accumulate(Object workingMemoryContext,
Object context,
Tuple leftTuple,
InternalFactHandle handle,
WorkingMemory workingMemory)
Executes the accumulate (action) code for the given fact handle
|
abstract Accumulate |
clone()
Returns a clone from itself
|
abstract Object |
createContext() |
abstract Object |
createWorkingMemoryContext() |
abstract Accumulator[] |
getAccumulators() |
protected Declaration[] |
getInnerDeclarationCache() |
Map<String,Declaration> |
getInnerDeclarations()
Returns a Map of declarations that are
visible inside this conditional element
|
List<RuleConditionElement> |
getNestedElements()
Returs a list of RuleConditionElement's that are nested
inside the current element
|
Map<String,Declaration> |
getOuterDeclarations()
Returns a Map of declarations that are visible
outside this conditional element.
|
Declaration[] |
getRequiredDeclarations() |
abstract Object |
getResult(Object workingMemoryContext,
Object context,
Tuple leftTuple,
WorkingMemory workingMemory)
Gets the result of the accumulation
|
RuleConditionElement |
getSource() |
boolean |
hasRequiredDeclarations() |
abstract void |
init(Object workingMemoryContext,
Object context,
Tuple leftTuple,
WorkingMemory workingMemory)
Executes the initialization block of code
|
abstract boolean |
isMultiFunction() |
boolean |
isPatternScopeDelimiter()
Returns true in case this RuleConditionElement delimits
a pattern visibility scope.
|
void |
readExternal(ObjectInput in) |
protected void |
registerClone(Accumulate clone) |
protected abstract void |
replaceAccumulatorDeclaration(Declaration declaration,
Declaration resolved) |
void |
replaceDeclaration(Declaration declaration,
Declaration resolved) |
boolean |
requiresLeftActivation() |
void |
resetInnerDeclarationCache() |
Declaration |
resolveDeclaration(String identifier)
Resolves the given identifier in the current scope and
returns the Declaration object for the declaration.
|
abstract void |
reverse(Object workingMemoryContext,
Object context,
Tuple leftTuple,
InternalFactHandle handle,
WorkingMemory workingMemory)
Executes the reverse (action) code for the given fact handle
|
abstract boolean |
supportsReverse()
Returns true if this accumulate supports reverse
|
void |
writeExternal(ObjectOutput out) |
protected RuleConditionElement source
protected Declaration[] requiredDeclarations
protected Declaration[] innerDeclarationCache
protected List<Accumulate> cloned
public Accumulate()
public Accumulate(RuleConditionElement source, Declaration[] requiredDeclarations)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic abstract Accumulator[] getAccumulators()
public abstract Object createContext()
public abstract void init(Object workingMemoryContext, Object context, Tuple leftTuple, WorkingMemory workingMemory)
public abstract void accumulate(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, WorkingMemory workingMemory)
public abstract void reverse(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, WorkingMemory workingMemory)
public abstract Object getResult(Object workingMemoryContext, Object context, Tuple leftTuple, WorkingMemory workingMemory)
public abstract boolean supportsReverse()
public abstract Accumulate clone()
RuleConditionElementclone in interface RuleConditionElementclone in class ConditionalElementprotected void registerClone(Accumulate clone)
public RuleConditionElement getSource()
public Map<String,Declaration> getInnerDeclarations()
RuleConditionElementgetInnerDeclarations in interface RuleConditionElementpublic Map<String,Declaration> getOuterDeclarations()
RuleConditionElementgetOuterDeclarations in interface RuleConditionElementpublic Declaration resolveDeclaration(String identifier)
RuleConditionElementresolveDeclaration in interface RuleConditionElementpublic abstract Object createWorkingMemoryContext()
public List<RuleConditionElement> getNestedElements()
RuleConditionElementgetNestedElements in interface RuleConditionElementpublic boolean isPatternScopeDelimiter()
RuleConditionElementisPatternScopeDelimiter in interface RuleConditionElementpublic abstract boolean isMultiFunction()
public void replaceDeclaration(Declaration declaration, Declaration resolved)
protected abstract void replaceAccumulatorDeclaration(Declaration declaration, Declaration resolved)
public void resetInnerDeclarationCache()
protected Declaration[] getInnerDeclarationCache()
public Declaration[] getRequiredDeclarations()
public boolean hasRequiredDeclarations()
public boolean requiresLeftActivation()
requiresLeftActivation in interface PatternSourceCopyright © 2001–2016 JBoss by Red Hat. All rights reserved.