Kagome
Polkadot Runtime Engine in C++17
kagome::api::RpcThreadPool Class Reference

thread pool for serve RPC calls More...

#include <rpc_thread_pool.hpp>

Inheritance diagram for kagome::api::RpcThreadPool:
Collaboration diagram for kagome::api::RpcThreadPool:

Classes

struct  Configuration
 

Public Types

using Context = RpcContext
 

Public Member Functions

 RpcThreadPool (std::shared_ptr< Context > context, const Configuration &configuration)
 
 ~RpcThreadPool ()=default
 
void start ()
 starts pool More...
 
void stop ()
 stops pool More...
 

Private Attributes

std::shared_ptr< Contextcontext_
 
const Configuration config_
 
std::vector< std::shared_ptr< std::thread > > threads_
 
log::Logger logger_ = log::createLogger("RpcThreadPool", "rpc_transport")
 

Detailed Description

thread pool for serve RPC calls

Definition at line 22 of file rpc_thread_pool.hpp.


Class Documentation

struct kagome::api::RpcThreadPool::Configuration

Definition at line 26 of file rpc_thread_pool.hpp.

Collaboration diagram for kagome::api::RpcThreadPool::Configuration:
Class Members
size_t max_thread_number
size_t min_thread_number

Member Typedef Documentation

Constructor & Destructor Documentation

kagome::api::RpcThreadPool::RpcThreadPool ( std::shared_ptr< Context context,
const Configuration configuration 
)

Definition at line 13 of file rpc_thread_pool.cpp.

kagome::api::RpcThreadPool::~RpcThreadPool ( )
default

Member Function Documentation

void kagome::api::RpcThreadPool::start ( )

starts pool

Definition at line 19 of file rpc_thread_pool.cpp.

void kagome::api::RpcThreadPool::stop ( )

stops pool

Definition at line 34 of file rpc_thread_pool.cpp.

Member Data Documentation

const Configuration kagome::api::RpcThreadPool::config_
private

Definition at line 48 of file rpc_thread_pool.hpp.

std::shared_ptr<Context> kagome::api::RpcThreadPool::context_
private

Definition at line 47 of file rpc_thread_pool.hpp.

log::Logger kagome::api::RpcThreadPool::logger_ = log::createLogger("RpcThreadPool", "rpc_transport")
private

Definition at line 52 of file rpc_thread_pool.hpp.

std::vector<std::shared_ptr<std::thread> > kagome::api::RpcThreadPool::threads_
private

Definition at line 50 of file rpc_thread_pool.hpp.


The documentation for this class was generated from the following files: