00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #include <drizzled/plugin/plugin.h>
00025 #include <drizzled/session.h>
00026 #include <drizzled/visibility.h>
00027
00028 namespace drizzled {
00029 namespace plugin {
00030
00035 class DRIZZLED_API Scheduler : public Plugin
00036 {
00037 public:
00038 explicit Scheduler(std::string name_arg)
00039 : Plugin(name_arg, "Scheduler")
00040 {}
00041
00046 virtual bool addSession(const Session::shared_ptr&)= 0;
00047
00051 virtual void killSession(Session*) {}
00052
00056 virtual void killSessionNow(const Session::shared_ptr&) {}
00057
00058 static bool addPlugin(plugin::Scheduler*);
00059 static void removePlugin(plugin::Scheduler*);
00060 static bool setPlugin(const std::string& name);
00061 static Scheduler* getScheduler();
00062 };
00063
00064 }
00065 }
00066