public interface Function<T>
| Modifier and Type | Field and Description |
|---|---|
static Function |
ERROR_FUNCTION |
static org.slf4j.Logger |
log |
| Modifier and Type | Method and Description |
|---|---|
FunctionDescriptor<T> |
descriptor() |
T |
evaluate(FunctionArgs args,
EvaluationContext context) |
Object |
preComputeConstantArgument(FunctionArgs args,
String name,
Expression arg)
Implementations should provide a non-null value for each argument they wish to pre-compute.
|
default void |
preprocessArgs(FunctionArgs args) |
static final org.slf4j.Logger log
static final Function ERROR_FUNCTION
default void preprocessArgs(FunctionArgs args)
Object preComputeConstantArgument(FunctionArgs args, String name, Expression arg)
args - the function args for this functions, usually you don't need thisname - the name of the argument to potentially precomputearg - the expression tree for the argumentnull if the value should be dynamically calculated for each invocationT evaluate(FunctionArgs args, EvaluationContext context)
FunctionDescriptor<T> descriptor()
Copyright © 2012–2021 Graylog, Inc.. All rights reserved.