public interface AccumulateFunction<C extends Serializable> extends Externalizable
| Modifier and Type | Method and Description | 
|---|---|
void | 
accumulate(C context,
          Object value)
Executes the accumulation action 
 | 
default Object | 
accumulateValue(C context,
               Object value)
Executes the accumulation action returning the accumulated object that will be passed back
 to the reverse method when this value will be eventually removed from acccumulation. 
 | 
C | 
createContext()
Creates and returns a new context object 
 | 
Object | 
getResult(C context)  | 
Class<?> | 
getResultType()  | 
void | 
init(C context)
Initializes the accumulator 
 | 
default C | 
initContext(C context)
Initializes the accumulator, possibly returning a new accumulation context instead of the original one 
 | 
void | 
reverse(C context,
       Object value)
Reverses the accumulation action 
 | 
boolean | 
supportsReverse()  | 
default boolean | 
tryReverse(C context,
          Object value)
Reverses the accumulation action 
 | 
readExternal, writeExternalC createContext()
void init(C context) throws Exception
context - never nullExceptiondefault C initContext(C context)
context - void accumulate(C context, Object value)
context - never nullvalue - default Object accumulateValue(C context, Object value)
context - value - void reverse(C context, Object value) throws Exception
context - never nullvalue - ExceptionObject getResult(C context) throws Exception
Exceptionboolean supportsReverse()
Class<?> getResultType()
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.