~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/listen.h

  • Committer: Andrew Hutchings
  • Date: 2011-01-31 14:35:57 UTC
  • mto: (2136.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2137.
  • Revision ID: andrew@linuxjedi.co.uk-20110131143557-ul09gpvfwhx0p0nt
Add protocol counters table

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#define DRIZZLED_PLUGIN_LISTEN_H
22
22
 
23
23
#include "drizzled/plugin/plugin.h"
24
 
 
 
24
#include "drizzled/atomics.h"
25
25
#include <vector>
26
26
 
27
27
#include "drizzled/visibility.h"
32
32
{
33
33
 
34
34
class Client;
35
 
 
 
35
class Listen;
 
36
typedef std::vector<Listen *> ListenVector;
 
37
typedef std::pair<std::string*, drizzled::atomic<uint64_t>*> ListenCounter;
36
38
/**
37
39
 * This class is used by client plugins to provide and manage the listening
38
40
 * interface for new client instances.
42
44
  Listen();
43
45
  Listen(const Listen&);
44
46
  Listen& operator=(const Listen&);
 
47
protected:
 
48
  std::vector<ListenCounter*> counters;
45
49
public:
46
50
  explicit Listen(std::string name_arg)
47
51
    : Plugin(name_arg, "Listen")
48
52
  {}
49
53
  virtual ~Listen() {}
50
54
 
 
55
  static ListenVector &getListenProtocols();
 
56
 
 
57
  std::vector<ListenCounter*>& getCounters()
 
58
  {
 
59
    return counters;
 
60
  }
51
61
  /**
52
62
   * This provides a list of file descriptors to watch that will trigger new
53
63
   * Client instances. When activity is detected on one of the returned file
98
108
};
99
109
 
100
110
} /* namespace plugin */
 
111
 
101
112
} /* namespace drizzled */
102
113
 
103
114
#endif /* DRIZZLED_PLUGIN_LISTEN_H */