Interface Engine

All Known Implementing Classes:
GraalJsEngine, Jsr223Engine

public interface Engine
The interface serves as an abstraction of expression language engine.
Author:
Jiri Pechanec
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(String language, String expression)
    Pre-compiles the expression for repeated execution.
    <T> T
    eval(org.apache.kafka.connect.connector.ConnectRecord<?> record, Class<T> type)
    Calculate a value out of the record.
  • Method Details

    • configure

      void configure(String language, String expression)
      Pre-compiles the expression for repeated execution. The method is called once upon the engine initialization.
      Parameters:
      expression -
    • eval

      <T> T eval(org.apache.kafka.connect.connector.ConnectRecord<?> record, Class<T> type)
      Calculate a value out of the record.
      Parameters:
      record - to be used
      Returns:
      result of calculation