drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
multi_thread::MultiThreadScheduler Class Reference
Inheritance diagram for multi_thread::MultiThreadScheduler:
[legend]
Collaboration diagram for multi_thread::MultiThreadScheduler:
[legend]

Public Member Functions

 MultiThreadScheduler (const char *name_arg)
bool addSession (const drizzled::Session::shared_ptr &)
void killSessionNow (const drizzled::Session::shared_ptr &)
void killSession (drizzled::Session *)
void runSession (drizzled::session_id_t)
Public Member Functions inherited from drizzled::plugin::Scheduler
 Scheduler (std::string name_arg)
Public Member Functions inherited from drizzled::plugin::Plugin
 Plugin (const std::string &name, const std::string &type_name)
virtual void shutdownPlugin ()
virtual void prime ()
virtual void startup (drizzled::Session &)
void activate ()
void deactivate ()
bool isActive () const
const std::string & getName () const
void setModule (module::Module *module)
const std::string & getTypeName () const
virtual bool removeLast () const
const std::string & getModuleName () const

Private Member Functions

void setStackSize ()

Private Attributes

drizzled::atomic< uint32_t > thread_count

Additional Inherited Members

Public Types inherited from drizzled::plugin::Plugin
typedef std::pair< const std::string, const std::string > map_key
typedef std::unique_ptr< plugin::Plugin, deleter_fn > owned_ptr
typedef std::map< const map_key, owned_ptr > map
typedef std::vector< Plugin * > vector
Static Public Member Functions inherited from drizzled::plugin::Scheduler
static bool addPlugin (plugin::Scheduler &)
static void removePlugin (plugin::Scheduler &)
static bool setPlugin (const std::string &name)
static Scheduler * getScheduler ()

Detailed Description

Definition at line 28 of file multi_thread.h.

Constructor & Destructor Documentation

◆ MultiThreadScheduler()

multi_thread::MultiThreadScheduler::MultiThreadScheduler ( const char * name_arg)
inline

Definition at line 34 of file multi_thread.h.

◆ ~MultiThreadScheduler()

multi_thread::MultiThreadScheduler::~MultiThreadScheduler ( )

Definition at line 160 of file multi_thread.cc.

Member Function Documentation

◆ addSession()

bool multi_thread::MultiThreadScheduler::addSession ( const drizzled::Session::shared_ptr & )
virtual

Add a session to the scheduler. When the scheduler is ready to run the session, it should call session->run().

Implements drizzled::plugin::Scheduler.

Definition at line 107 of file multi_thread.cc.

◆ killSession()

void multi_thread::MultiThreadScheduler::killSession ( drizzled::Session * )
virtual

Notify the scheduler that it should be killed gracefully.

Reimplemented from drizzled::plugin::Scheduler.

Definition at line 139 of file multi_thread.cc.

◆ killSessionNow()

void multi_thread::MultiThreadScheduler::killSessionNow ( const drizzled::Session::shared_ptr & )
virtual

This is called when a scheduler should kill the session immedaitely.

Reimplemented from drizzled::plugin::Scheduler.

Definition at line 149 of file multi_thread.cc.

◆ runSession()

void multi_thread::MultiThreadScheduler::runSession ( drizzled::session_id_t id)

Definition at line 53 of file multi_thread.cc.

◆ setStackSize()

void multi_thread::MultiThreadScheduler::setStackSize ( )
private

Definition at line 89 of file multi_thread.cc.

Member Data Documentation

◆ thread_count

drizzled::atomic<uint32_t> multi_thread::MultiThreadScheduler::thread_count
private

Definition at line 31 of file multi_thread.h.


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