Class GraalJsEngine

java.lang.Object
io.debezium.transforms.scripting.Jsr223Engine
io.debezium.transforms.scripting.GraalJsEngine
All Implemented Interfaces:
Engine

public class GraalJsEngine extends Jsr223Engine
An implementation of the expression language evaluator based on GraalVM. Key and value structs are exposed as ProxyObjects, allowing for simplified property references.
Author:
Jiri Pechanec
  • Field Summary

    Fields inherited from class io.debezium.transforms.scripting.Jsr223Engine

    engine
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private org.graalvm.polyglot.proxy.ProxyObject
    Exposes the given Map as a ProxyObject, allowing for simplified property reference.
    private org.graalvm.polyglot.proxy.ProxyObject
    asProxyObject(org.apache.kafka.connect.data.Struct struct)
    Exposes the given struct as a ProxyObject, allowing for simplified property references, also providing any write access.
    protected void
     
    protected RecordHeader
    header(org.apache.kafka.connect.header.Header header)
     
    protected Object
    headers(org.apache.kafka.connect.connector.ConnectRecord<?> record)
     
    protected Object
    key(org.apache.kafka.connect.connector.ConnectRecord<?> record)
     
    protected Object
    value(org.apache.kafka.connect.connector.ConnectRecord<?> record)
     

    Methods inherited from class io.debezium.transforms.scripting.Jsr223Engine

    configure, doHeaders, eval, getBindings

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GraalJsEngine

      public GraalJsEngine()
  • Method Details

    • configureEngine

      protected void configureEngine()
      Overrides:
      configureEngine in class Jsr223Engine
    • key

      protected Object key(org.apache.kafka.connect.connector.ConnectRecord<?> record)
      Overrides:
      key in class Jsr223Engine
    • value

      protected Object value(org.apache.kafka.connect.connector.ConnectRecord<?> record)
      Overrides:
      value in class Jsr223Engine
    • headers

      protected Object headers(org.apache.kafka.connect.connector.ConnectRecord<?> record)
      Overrides:
      headers in class Jsr223Engine
    • header

      protected RecordHeader header(org.apache.kafka.connect.header.Header header)
      Overrides:
      header in class Jsr223Engine
    • asProxyObject

      private org.graalvm.polyglot.proxy.ProxyObject asProxyObject(org.apache.kafka.connect.data.Struct struct)
      Exposes the given struct as a ProxyObject, allowing for simplified property references, also providing any write access.
    • asProxyObject

      private org.graalvm.polyglot.proxy.ProxyObject asProxyObject(Map<String,?> map)
      Exposes the given Map as a ProxyObject, allowing for simplified property reference.