libkazv
Kazv::CprJobHandler::Private Struct Reference
Collaboration diagram for Kazv::CprJobHandler::Private:

Classes

struct  JobDesc
 
struct  ReadCallback
 
struct  WriteCallback
 

Public Types

enum  Status { Waiting, Running }
 
using TimerSP = std::shared_ptr< boost::asio::steady_timer >
 
using TimerSPList = std::vector< TimerSP >
 
using TimerMap = std::unordered_map< std::optional< std::string >, TimerSPList >
 
using Callback = std::function< void(Response)>
 
using JobQueue = std::deque< JobDesc >
 
using JobMap = std::unordered_map< std::string, JobQueue >
 

Public Member Functions

void submitImpl (BaseJob job, std::function< void(Response)> userCallback)
 
void addToQueue (BaseJob job, Callback callback)
 
void clearQueue (std::string queueId)
 
void clearQueueImpl (std::string queueId)
 
void popJob (std::string queueId)
 
void popJobImpl (std::string queueId)
 
void monitorQueues ()
 
void addTimerToMap (TimerSP timer, std::optional< std::string > timerId)
 
void clearTimer (TimerSP timer, std::optional< std::string > timerId)
 
void cancelAllTimers (std::optional< std::string > timerId)
 
void cancelAllTimersImpl (std::optional< std::string > timerId)
 
void intervalTimerCallback (TimerSP timer, std::function< void()> func, int ms, const boost::system::error_code &error)
 

Public Attributes

CprJobHandlerq
 
boost::asio::io_context::executor_type executor
 
TimerMap timerMap
 
JobMap jobQueues
 

Member Typedef Documentation

◆ Callback

using Kazv::CprJobHandler::Private::Callback = std::function<void(Response)>

◆ JobMap

using Kazv::CprJobHandler::Private::JobMap = std::unordered_map<std::string, JobQueue>

◆ JobQueue

◆ TimerMap

using Kazv::CprJobHandler::Private::TimerMap = std::unordered_map<std::optional<std::string>, TimerSPList>

◆ TimerSP

using Kazv::CprJobHandler::Private::TimerSP = std::shared_ptr<boost::asio::steady_timer>

◆ TimerSPList

Member Enumeration Documentation

◆ Status

Enumerator
Waiting 
Running 

Member Function Documentation

◆ addTimerToMap()

void Kazv::CprJobHandler::Private::addTimerToMap ( TimerSP  timer,
std::optional< std::string >  timerId 
)
inline

◆ addToQueue()

void Kazv::CprJobHandler::Private::addToQueue ( BaseJob  job,
Callback  callback 
)
inline

◆ cancelAllTimers()

void Kazv::CprJobHandler::Private::cancelAllTimers ( std::optional< std::string >  timerId)
inline

◆ cancelAllTimersImpl()

void Kazv::CprJobHandler::Private::cancelAllTimersImpl ( std::optional< std::string >  timerId)
inline

◆ clearQueue()

void Kazv::CprJobHandler::Private::clearQueue ( std::string  queueId)
inline

◆ clearQueueImpl()

void Kazv::CprJobHandler::Private::clearQueueImpl ( std::string  queueId)
inline

◆ clearTimer()

void Kazv::CprJobHandler::Private::clearTimer ( TimerSP  timer,
std::optional< std::string >  timerId 
)
inline

◆ intervalTimerCallback()

void Kazv::CprJobHandler::Private::intervalTimerCallback ( TimerSP  timer,
std::function< void()>  func,
int  ms,
const boost::system::error_code &  error 
)
inline

◆ monitorQueues()

void Kazv::CprJobHandler::Private::monitorQueues ( )
inline

◆ popJob()

void Kazv::CprJobHandler::Private::popJob ( std::string  queueId)
inline

◆ popJobImpl()

void Kazv::CprJobHandler::Private::popJobImpl ( std::string  queueId)
inline

◆ submitImpl()

void Kazv::CprJobHandler::Private::submitImpl ( BaseJob  job,
std::function< void(Response)>  userCallback 
)

Member Data Documentation

◆ executor

boost::asio::io_context::executor_type Kazv::CprJobHandler::Private::executor

◆ jobQueues

JobMap Kazv::CprJobHandler::Private::jobQueues

◆ q

CprJobHandler* Kazv::CprJobHandler::Private::q

◆ timerMap

TimerMap Kazv::CprJobHandler::Private::timerMap

The documentation for this struct was generated from the following file: