26#ifndef ROUTER_SRC_JIT_EXECUTOR_INCLUDE_MYSQLROUTER_JIT_EXECUTOR_COMPONENT_H_ 
   27#define ROUTER_SRC_JIT_EXECUTOR_INCLUDE_MYSQLROUTER_JIT_EXECUTOR_COMPONENT_H_ 
   37#include <unordered_map> 
   42#include "mysqlrouter/jit_executor_plugin_export.h" 
   60  std::shared_ptr<shcore::polyglot::IFile_system> 
fs;
 
   74      const std::string &debug_port = 
"") = 0;
 
   79  virtual std::string 
error() = 0;
 
  124  void stop_debug_context(
const std::string &service_id);
 
  126  std::shared_ptr<IContextHandle> get_context(
 
  128      const std::string &debug_port = 
"", 
bool reset_context = 
false);
 
  130  void delete_context(
const std::string &service_id);
 
  132  void update_global_config(
const std::string &
options);
 
  136  void update_active_contexts(
 
  137      const std::pair<std::string, std::shared_ptr<IServiceHandlers>>
 
  143  std::unordered_map<std::string, std::shared_ptr<IServiceHandlers>>
 
Interface defining central location for the handlers associated to a database service.
Definition: jit_executor_component.h:70
 
virtual void set_max_heap_size(uint64_t)=0
 
virtual std::string error()=0
 
virtual uint64_t memory_units() const =0
 
virtual ~IServiceHandlers()=default
 
virtual void teardown()=0
 
virtual std::shared_ptr< IContextHandle > get_context(const std::string &debug_port="")=0
 
virtual std::chrono::seconds idle_time() const =0
 
virtual void release_debug_context()=0
 
Registry of graal contexts to be used by each service.
Definition: jit_executor_component.h:113
 
JitExecutorComponent()=default
 
JitExecutorComponent(JitExecutorComponent &&)=delete
 
void operator=(JitExecutorComponent &&)=delete
 
void operator=(JitExecutorComponent const &)=delete
 
JitExecutorComponent(JitExecutorComponent const &)=delete
 
GlobalConfig m_global_config
Definition: jit_executor_component.h:141
 
std::unordered_map< std::string, std::string > m_handler_errors
Definition: jit_executor_component.h:146
 
std::unordered_map< std::string, std::shared_ptr< IServiceHandlers > > m_service_context_handlers
Definition: jit_executor_component.h:144
 
std::mutex m_context_creation
Definition: jit_executor_component.h:139
 
std::vector< std::shared_ptr< IServiceHandlers > > m_inactive_context_handlers
Definition: jit_executor_component.h:148
 
Definition: jit_executor_callbacks.h:36
 
static const uint64_t k_default_memory_units
Definition: jit_executor_component.h:48
 
std::chrono::seconds seconds
Definition: authorize_manager.cc:68
 
Definition: options.cc:57
 
Value::Map_type_ref Dictionary_t
Definition: jit_executor_value.h:430
 
Definition: jit_executor_component.h:49
 
std::optional< uint64_t > maximum_idle_time
Definition: jit_executor_component.h:56
 
std::optional< uint64_t > maximum_ram_size
Definition: jit_executor_component.h:55
 
bool operator==(const GlobalConfig &o) const
Definition: jit_executor_component.h:50
 
Definition: jit_executor_component.h:59
 
shcore::Dictionary_t globals
Definition: jit_executor_component.h:62
 
std::optional< uint64_t > memory_units
Definition: jit_executor_component.h:63
 
std::vector< std::string > module_files
Definition: jit_executor_component.h:61
 
std::shared_ptr< shcore::polyglot::IFile_system > fs
Definition: jit_executor_component.h:60
 
std::optional< uint64_t > max_heap_size
Definition: jit_executor_component.h:64