public class ArbitraryAggregation extends AggregationFunction<java.lang.Object,java.lang.Object>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
FunctionInfo |
info() |
java.lang.Object |
iterate(RamAccountingContext ramAccountingContext,
java.lang.Object state,
Input... args)
the "aggregate" function.
|
java.lang.Comparable |
newState(RamAccountingContext ramAccountingContext)
Called once per "aggregation cycle" to create an initial partial-state-value.
|
DataType |
partialType() |
java.lang.Object |
reduce(RamAccountingContext ramAccountingContext,
java.lang.Object state1,
java.lang.Object state2)
This function merges two aggregation states together and returns that merged state.
|
static void |
register(AggregationImplModule mod) |
java.lang.Object |
terminatePartial(RamAccountingContext ramAccountingContext,
java.lang.Object state)
Called to transform partial states into their final form.
|
normalizeSymbol
public static final java.lang.String NAME
public static void register(AggregationImplModule mod)
public FunctionInfo info()
public DataType partialType()
partialType
in class AggregationFunction<java.lang.Object,java.lang.Object>
public java.lang.Comparable newState(RamAccountingContext ramAccountingContext)
AggregationFunction
newState
in class AggregationFunction<java.lang.Object,java.lang.Object>
ramAccountingContext
- used to account the memory used for the state.public java.lang.Object iterate(RamAccountingContext ramAccountingContext, java.lang.Object state, Input... args)
AggregationFunction
iterate
in class AggregationFunction<java.lang.Object,java.lang.Object>
ramAccountingContext
- used to account for additional memory usage if the state grows in sizestate
- the previous aggregation stateargs
- arguments / input values matching the types of FunctionInfo.argumentTypes.
These are usually used to increment/modify the previous statepublic java.lang.Object reduce(RamAccountingContext ramAccountingContext, java.lang.Object state1, java.lang.Object state2)
AggregationFunction
reduce
in class AggregationFunction<java.lang.Object,java.lang.Object>
public java.lang.Object terminatePartial(RamAccountingContext ramAccountingContext, java.lang.Object state)
AggregationFunction
terminatePartial
in class AggregationFunction<java.lang.Object,java.lang.Object>