Package com.arcadedb.query.polyglot
Class GraalPolyglotEngine
- java.lang.Object
-
- com.arcadedb.query.polyglot.GraalPolyglotEngine
-
- All Implemented Interfaces:
AutoCloseable
public class GraalPolyglotEngine extends Object implements AutoCloseable
Polyglot script engine based on GraalVM.- Author:
- Luca Garulli ([email protected])
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GraalPolyglotEngine.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static String
endUserMessage(Throwable e, boolean includePosition)
org.graalvm.polyglot.Value
eval(String script)
static Set<String>
getSupportedLanguages()
static boolean
isCriticalError(org.graalvm.polyglot.PolyglotException e)
static GraalPolyglotEngine.Builder
newBuilder(Database database, org.graalvm.polyglot.Engine sharedEngine)
void
setAttribute(String name, Object value)
-
-
-
Method Detail
-
newBuilder
public static GraalPolyglotEngine.Builder newBuilder(Database database, org.graalvm.polyglot.Engine sharedEngine)
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
eval
public org.graalvm.polyglot.Value eval(String script) throws IOException
- Throws:
IOException
-
isCriticalError
public static boolean isCriticalError(org.graalvm.polyglot.PolyglotException e)
-
-