public EPRuntimeCompileReflectiveSPI getReflectiveCompileSvc() { if (compileReflective == null) { compileReflective = new EPRuntimeCompileReflectiveSPI(new EPRuntimeCompileReflectiveService(), this); } return compileReflective; }
public EPCompiled reflectiveCompile(Module module, Configuration configuration, EPCompilerPathable optionalPathable) { CompileMethod method = (compiler, args) -> compileModuleObject.invoke(compiler, module, args); return compileInternal(method, configuration, optionalPathable); }
private boolean init() { Class compilerArgsClass = findClassByName(CLASSNAME_COMPILER_ARGUMENTS); if (compilerArgsClass == null) { return false; Class compilerPathClass = findClassByName(CLASSNAME_COMPILER_PATH); if (compilerPathClass == null) { return false; Class compilerProvider = findClassByName(CLASSNAME_COMPILER_PROVIDER); if (compilerProvider == null) { return false; Class compiler = findClassByName(CLASSNAME_COMPILER); if (compiler == null) { return false; Class compilerExpressions = findClassByName(CLASSNAME_COMPILER_EXPRESSIONS); if (compilerExpressions == null) { return false; compilerArgsCtor = findConstructor(compilerArgsClass, Configuration.class); if (compilerArgsCtor == null) { return false; compilerArgsGetPath = findMethod(compilerArgsClass, "getPath"); if (compilerArgsGetPath == null) { return false; compilerPathAdd = findMethod(compilerPathClass, "add", EPCompilerPathable.class);
public Module reflectiveParseModule(String epl) { Object compiler = getCompiler(); // Same as: compiler.parseModule(epl); try { return (Module) parseModule.invoke(compiler, epl); } catch (Throwable t) { throw new EPException("Failed to invoke parse-module: " + t.getMessage(), t); } }
public EPCompiled reflectiveCompile(String epl) { return provider.reflectiveCompile(epl, runtime.getConfigurationDeepCopy(), runtime.getRuntimePath()); }
public EPRuntimeCompileReflectiveService() { this.available = init(); }
public boolean isCompilerAvailable() { return provider.isCompilerAvailable(); }
public ExprNode reflectiveCompileExpression(String epl, EventType[] eventTypes, String[] streamNames) throws EPException { return provider.reflectiveCompileExpression(epl, eventTypes, streamNames, runtime.getConfigurationDeepCopy()); }
public EPStatementObjectModel reflectiveEPLToModel(String epl, Configuration configuration) throws EPException { Object compiler = getCompiler(); // Same as: compiler.eplToModel(epl, Configuration configuration) throws EPCompileException; try { return (EPStatementObjectModel) eplToModel.invoke(compiler, epl, configuration); } catch (Throwable t) { throw new EPException("Failed to invoke epl-to-model: " + t.getMessage(), t); } }
public EPCompiled reflectiveCompile(Module module) { return provider.reflectiveCompile(module, runtime.getConfigurationDeepCopy(), runtime.getRuntimePath()); }
public ExprNode reflectiveCompileExpression(String epl, EventType[] eventTypes, String[] streamNames, Configuration configuration) throws EPException { Object compiler = getCompiler(); // Same as: EPCompilerSPIExpression exprCompiler = compiler.expressionCompiler(configuration); Object exprCompiler; try { exprCompiler = expressionCompiler.invoke(compiler, configuration); } catch (Throwable t) { throw new EPException("Failed to invoke expression-compiler-method of compiler path: " + t.getMessage(), t); } // Same as: exprCompiler.compileValidate(epl, eventTypes, streamNames) try { return (ExprNode) compileValidate.invoke(exprCompiler, epl, eventTypes, streamNames); } catch (Throwable t) { throw new EPException(t.getMessage(), t); } }
public EPCompiled reflectiveCompileFireAndForget(String epl, Configuration configuration, EPCompilerPathable optionalPathable) throws EPException { CompileMethod method = (compiler, args) -> compileFireAndForget.invoke(compiler, epl, args); return compileInternal(method, configuration, optionalPathable); }
private EPCompiled compileInternal(CompileMethod compileMethod, Configuration configuration, EPCompilerPathable optionalPathable) throws EPException { Object compiler = getCompiler();
public EPCompiled reflectiveCompile(String epl, Configuration configuration, EPCompilerPathable optionalPathable) { CompileMethod method = (compiler, args) -> compileModuleString.invoke(compiler, epl, args); return compileInternal(method, configuration, optionalPathable); }