26#ifndef ROUTER_SRC_JIT_EXECUTOR_INCLUDE_MYSQLROUTER_JIT_EXECUTOR_COMPONENT_H_
27#define ROUTER_SRC_JIT_EXECUTOR_INCLUDE_MYSQLROUTER_JIT_EXECUTOR_COMPONENT_H_
35#include <unordered_map>
40#include "mysqlrouter/jit_executor_plugin_export.h"
61 std::shared_ptr<shcore::polyglot::IFile_system>
fs;
76 const std::string &debug_port =
"") = 0;
126 void stop_debug_context(
const std::string &service_id);
128 std::shared_ptr<IContextHandle> get_context(
130 const std::string &debug_port =
"",
bool reset_context =
false);
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:72
virtual void set_max_heap_size(uint64_t)=0
virtual uint64_t pool_size() const =0
virtual ~IServiceHandlers()=default
virtual void set_default_pool_size(uint64_t)=0
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:115
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::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:146
Definition: jit_executor_callbacks.h:36
static const uint64_t k_default_pool_size
Definition: jit_executor_component.h:46
std::chrono::seconds seconds
Definition: authorize_manager.cc:69
Definition: options.cc:57
Value::Map_type_ref Dictionary_t
Definition: jit_executor_value.h:430
Definition: jit_executor_component.h:48
uint64_t default_pool_size
Definition: jit_executor_component.h:57
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:49
Definition: jit_executor_component.h:60
shcore::Dictionary_t globals
Definition: jit_executor_component.h:63
std::vector< std::string > module_files
Definition: jit_executor_component.h:62
std::optional< uint64_t > pool_size
Definition: jit_executor_component.h:64
uint64_t default_pool_size
Definition: jit_executor_component.h:65
std::shared_ptr< shcore::polyglot::IFile_system > fs
Definition: jit_executor_component.h:61
std::optional< uint64_t > max_heap_size
Definition: jit_executor_component.h:66