~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/scheduler.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-11-28 22:02:19 UTC
  • mfrom: (1228 push)
  • mto: (1228.4.1 push)
  • mto: This revision was merged to the branch mainline in revision 1234.
  • Revision ID: osullivan.padraig@gmail.com-20091128220219-m3x28m8q2unbirke
MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#ifndef DRIZZLED_PLUGIN_SCHEDULER_H
23
23
#define DRIZZLED_PLUGIN_SCHEDULER_H
24
24
 
25
 
#include "drizzled/session.h"
26
 
#include "drizzled/plugin/plugin.h"
27
 
 
28
25
#include <string>
29
26
#include <vector>
30
27
 
31
28
namespace drizzled
32
29
{
33
 
 
34
 
class Session;
35
 
 
36
30
namespace plugin
37
31
{
38
32
 
56
50
   * Add a session to the scheduler. When the scheduler is ready to run the
57
51
   * session, it should call session->run().
58
52
   */
59
 
  virtual bool addSession(Session::shared_ptr &session)= 0;
 
53
  virtual bool addSession(Session *session)= 0;
60
54
 
61
55
  /**
62
56
   * Notify the scheduler that it should be killed gracefully.
66
60
  /**
67
61
   * This is called when a scheduler should kill the session immedaitely.
68
62
   */
69
 
  virtual void killSessionNow(Session::shared_ptr&) {}
 
63
  virtual void killSessionNow(Session *) {}
70
64
 
71
65
  static bool addPlugin(plugin::Scheduler *sced);
72
66
  static void removePlugin(plugin::Scheduler *sced);
73
67
  static bool setPlugin(const std::string& name);
74
68
  static Scheduler *getScheduler();
 
69
 
75
70
};
76
71
 
77
 
} /* namespace plugin */
78
 
} /* namespace drizzled */
 
72
} /* end namespace drizzled::plugin */
 
73
} /* end namespace drizzled */
79
74
 
80
75
#endif /* DRIZZLED_PLUGIN_SCHEDULER_H */