drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled::plugin::Scheduler Class Referenceabstract

#include <scheduler.h>

Inheritance diagram for drizzled::plugin::Scheduler:
[legend]
Collaboration diagram for drizzled::plugin::Scheduler:
[legend]

Public Member Functions

 Scheduler (std::string name_arg)
virtual bool addSession (const Session::shared_ptr &)=0
virtual void killSession (Session *)
virtual void killSessionNow (const Session::shared_ptr &)
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

Static Public Member Functions

static bool addPlugin (plugin::Scheduler &)
static void removePlugin (plugin::Scheduler &)
static bool setPlugin (const std::string &name)
static Scheduler * getScheduler ()

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

Detailed Description

This class should be used by scheduler plugins to implement custom session schedulers.

Definition at line 35 of file scheduler.h.

Constructor & Destructor Documentation

◆ Scheduler()

drizzled::plugin::Scheduler::Scheduler ( std::string name_arg)
inlineexplicit

Definition at line 38 of file scheduler.h.

Member Function Documentation

◆ addPlugin()

bool drizzled::plugin::Scheduler::addPlugin ( plugin::Scheduler & sched)
static

Definition at line 32 of file scheduler.cc.

◆ addSession()

virtual bool drizzled::plugin::Scheduler::addSession ( const Session::shared_ptr & )
pure virtual

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

Implemented in multi_thread::MultiThreadScheduler.

◆ getScheduler()

plugin::Scheduler * drizzled::plugin::Scheduler::getScheduler ( )
static

Definition at line 67 of file scheduler.cc.

◆ killSession()

virtual void drizzled::plugin::Scheduler::killSession ( Session * )
inlinevirtual

Notify the scheduler that it should be killed gracefully.

Reimplemented in multi_thread::MultiThreadScheduler.

Definition at line 51 of file scheduler.h.

◆ killSessionNow()

virtual void drizzled::plugin::Scheduler::killSessionNow ( const Session::shared_ptr & )
inlinevirtual

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

Reimplemented in multi_thread::MultiThreadScheduler.

Definition at line 56 of file scheduler.h.

◆ removePlugin()

void drizzled::plugin::Scheduler::removePlugin ( plugin::Scheduler & sched)
static

Definition at line 46 of file scheduler.cc.

◆ setPlugin()

bool drizzled::plugin::Scheduler::setPlugin ( const std::string & name)
static

Definition at line 51 of file scheduler.cc.


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