~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/slot/scheduler.h

Merged in plugin-slot-reorg patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_SCHEDULING_H
21
 
#define DRIZZLED_SCHEDULING_H
22
 
 
23
 
#include <drizzled/plugin/scheduler.h>
24
 
 
25
 
#include <string>
26
 
 
27
 
drizzled::plugin::Scheduler *get_thread_scheduler();
28
 
bool add_scheduler_factory(drizzled::plugin::SchedulerFactory *scheduler);
29
 
bool remove_scheduler_factory(drizzled::plugin::SchedulerFactory *scheduler);
30
 
bool set_scheduler_factory(const std::string& name);
31
 
 
32
 
#endif /* DRIZZLED_SCHEDULING_H */
 
20
#ifndef DRIZZLED_SLOT_SCHEDULER_H
 
21
#define DRIZZLED_SLOT_SCHEDULER_H
 
22
 
 
23
#include <drizzled/registry.h>
 
24
 
 
25
namespace drizzled
 
26
{
 
27
 
 
28
namespace plugin
 
29
{
 
30
  class SchedulerFactory;
 
31
  class Scheduler;
 
32
}
 
33
 
 
34
namespace slot
 
35
{
 
36
 
 
37
/**
 
38
 * Class to handle all Scheduler objects
 
39
 */
 
40
class Scheduler
 
41
{
 
42
private:
 
43
 
 
44
  plugin::SchedulerFactory *scheduler_factory;
 
45
  Registry<plugin::SchedulerFactory *> all_schedulers;
 
46
 
 
47
public:
 
48
 
 
49
  Scheduler();
 
50
  ~Scheduler();
 
51
 
 
52
  void add(plugin::SchedulerFactory *factory);
 
53
  void remove(plugin::SchedulerFactory *factory);
 
54
  bool setFactory(const std::string& name);
 
55
  plugin::Scheduler *getScheduler();
 
56
 
 
57
};
 
58
 
 
59
} /* namespace slot */
 
60
} /* namespace drizzled */
 
61
 
 
62
#endif /* DRIZZLED_SLOT_SCHEDULER_H */