Class GraalJsEvaluator<T>

java.lang.Object
io.nosqlbench.engine.api.scripting.GraalJsEvaluator<T>
All Implemented Interfaces:
ExprEvaluator<T>

public class GraalJsEvaluator<T>
extends java.lang.Object
implements ExprEvaluator<T>
  • Constructor Summary

    Constructors 
    Constructor Description
    GraalJsEvaluator​(java.lang.Class<T> resultType)  
  • Method Summary

    Modifier and Type Method Description
    T eval()
    Evaluate the provided script, returning the value that it yields
    ExprEvaluator<T> put​(java.lang.String varName, java.lang.Object var)
    Set the variable environment of the evaluator
    ExprEvaluator<T> script​(java.lang.String scriptText)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.nosqlbench.engine.api.scripting.ExprEvaluator

    put
  • Constructor Details

  • Method Details

    • eval

      public T eval()
      Description copied from interface: ExprEvaluator
      Evaluate the provided script, returning the value that it yields
      Specified by:
      eval in interface ExprEvaluator<T>
      Returns:
      An object of type T
    • script

      public ExprEvaluator<T> script​(java.lang.String scriptText)
      Specified by:
      script in interface ExprEvaluator<T>
      Parameters:
      scriptText - script text
      Returns:
      this ExprEvaluator, for method chaining
    • put

      public ExprEvaluator<T> put​(java.lang.String varName, java.lang.Object var)
      Description copied from interface: ExprEvaluator
      Set the variable environment of the evaluator
      Specified by:
      put in interface ExprEvaluator<T>
      Parameters:
      varName - the variable name to add to the environment
      var - the object to bind to the varname
      Returns:
      this ExprEvaluator, for method chaining