All Known Implementing Classes:
Abbreviate, AbstractFunction, AbstractPeriodComponentFunction, Base16Decode, Base16Encode, Base32Decode, Base32Encode, Base32HumanDecode, Base32HumanEncode, Base64Decode, Base64Encode, Base64UrlDecode, Base64UrlEncode, BooleanConversion, Capitalize, CEFParserFunction, CidrMatch, CloneMessage, Concat, Contains, CRC32, CRC32C, CreateMessage, DateConversion, Days, Debug, DoubleConversion, DropMessage, EndsWith, FirstNonNull, FlexParseDate, FormatDate, FromInput, GrokExists, GrokMatch, HasField, Hours, IpAddressConversion, IsBoolean, IsCollection, IsDate, IsDouble, IsIp, IsJson, IsList, IsLong, IsMap, IsNotNull, IsNull, IsNumber, IsPeriod, IsString, IsUrl, Join, JsonFlatten, JsonParse, KeyValue, Length, LongConversion, Lookup, LookupAddStringList, LookupClearKey, LookupRemoveStringList, LookupSetStringList, LookupSetValue, LookupStringList, LookupStringListContains, LookupValue, Lowercase, MapConversion, MD5, MetricCounterIncrement, Millis, Minutes, Months, Murmur3_128, Murmur3_32, Now, ParseDate, ParseUnixMilliseconds, PeriodParseFunction, RegexMatch, RegexReplace, RemoveField, RemoveFromStream, RenameField, Replace, RouteToStream, Seconds, SelectJsonPath, SetField, SetFields, SHA1, SHA256, SHA512, Split, StartsWith, StringConversion, StringUtilsFunction, Substring, Swapcase, SyslogFacilityConversion, SyslogLevelConversion, SyslogPriorityConversion, SyslogPriorityToStringConversion, TimezoneAwareFunction, TrafficAccountingSize, Uncapitalize, Uppercase, UrlConversion, UrlDecode, UrlEncode, Weeks, Years

public interface Function<T>
  • Field Details

    • log

      static final org.slf4j.Logger log
    • ERROR_FUNCTION

      static final Function ERROR_FUNCTION
  • Method Details

    • preprocessArgs

      default void preprocessArgs(FunctionArgs args)
    • preComputeConstantArgument

      Object preComputeConstantArgument(FunctionArgs args, String name, Expression arg)
      Implementations should provide a non-null value for each argument they wish to pre-compute.
      Examples include compile a Pattern from a regex string, which will never change during the lifetime of the function. If any part of the expression tree depends on external values this method will not be called, e.g. if the regex depends on a message field.
      Parameters:
      args - the function args for this functions, usually you don't need this
      name - the name of the argument to potentially precompute
      arg - the expression tree for the argument
      Returns:
      the precomputed value for the argument or null if the value should be dynamically calculated for each invocation
    • evaluate

      T evaluate(FunctionArgs args, EvaluationContext context)
    • descriptor

      FunctionDescriptor<T> descriptor()