6#ifndef KCENON_NETWORK_INTERNAL_INTEGRATION_THREAD_POOL_BRIDGE_H_
7#define KCENON_NETWORK_INTERNAL_INTEGRATION_THREAD_POOL_BRIDGE_H_
50#if KCENON_WITH_COMMON_SYSTEM
51#include <kcenon/common/interfaces/executor_interface.h>
106 std::shared_ptr<thread_pool_interface> pool,
220 const std::string& pool_name =
"network_pool");
222#if KCENON_WITH_COMMON_SYSTEM
241 static std::shared_ptr<ThreadPoolBridge> from_common_system(
242 std::shared_ptr<::kcenon::common::interfaces::IExecutor> executor);
246 std::shared_ptr<thread_pool_interface>
pool_;
Unified interface for external system integration bridges.
Abstract interface for external system integration bridges.
Bridge for thread pool integration implementing INetworkBridge.
BackendType get_backend_type() const
Get the backend type.
VoidResult shutdown() override
Shutdown the bridge.
std::mutex metrics_mutex_
BackendType
Type of thread pool backend.
@ ThreadSystem
Uses thread_system's thread pool.
@ CommonSystem
Uses common_system's IExecutor.
@ Custom
Uses custom thread_pool_interface.
BackendType backend_type_
static std::shared_ptr< ThreadPoolBridge > from_thread_system(const std::string &pool_name="network_pool")
Create bridge from thread_system.
ThreadPoolBridge(std::shared_ptr< thread_pool_interface > pool, BackendType backend_type=BackendType::Custom)
Construct bridge with custom thread pool.
bool is_initialized() const override
Check if the bridge is initialized.
std::shared_ptr< thread_pool_interface > pool_
std::shared_ptr< thread_pool_interface > get_thread_pool() const
Get the underlying thread pool.
BridgeMetrics get_metrics() const override
Get current metrics.
BridgeMetrics cached_metrics_
~ThreadPoolBridge() override
Destructor.
std::atomic< bool > initialized_
Feature flags for network_system.
VoidResult initialize()
Initialize the network system with default production configuration.
Configuration for bridge initialization.
Metrics and health information for a bridge.
Thread system integration interface for network_system.