#include <scheduler.h>
Public Types | |
typedef std::pair< const std::string, const std::string > | map_key |
typedef std::map< const map_key, plugin::Plugin * > | map |
typedef std::vector< Plugin * > | vector |
Public Member Functions | |
Scheduler (std::string name_arg) | |
virtual bool | addSession (Session::shared_ptr &session)=0 |
virtual void | killSession (Session *) |
virtual void | killSessionNow (Session::shared_ptr &) |
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 *sced) |
static void | removePlugin (plugin::Scheduler *sced) |
static bool | setPlugin (const std::string &name) |
static Scheduler * | getScheduler () |
Private Member Functions | |
Scheduler (const Scheduler &) | |
Scheduler & | operator= (const Scheduler &) |
This class should be used by scheduler plugins to implement custom session schedulers.
Definition at line 44 of file scheduler.h.
virtual bool drizzled::plugin::Scheduler::addSession | ( | Session::shared_ptr & | session | ) | [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.
virtual void drizzled::plugin::Scheduler::killSession | ( | Session * | ) | [inline, virtual] |
Notify the scheduler that it should be killed gracefully.
Reimplemented in multi_thread::MultiThreadScheduler.
Definition at line 65 of file scheduler.h.
virtual void drizzled::plugin::Scheduler::killSessionNow | ( | Session::shared_ptr & | ) | [inline, virtual] |
This is called when a scheduler should kill the session immedaitely.
Reimplemented in multi_thread::MultiThreadScheduler.
Definition at line 70 of file scheduler.h.