~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memcached_stats/stats_table.h

  • Committer: Brian Aker
  • Date: 2010-02-20 01:44:37 UTC
  • mfrom: (1273.13.94 build)
  • Revision ID: brian@gaz-20100220014437-0l1jlxf79lzeglwq
Merge JDaly, Lint fixes by brian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* 
 
1
/*
2
2
 * Copyright (c) 2009, Padraig O'Sullivan
3
3
 * All rights reserved.
4
4
 *
27
27
 * THE POSSIBILITY OF SUCH DAMAGE.
28
28
 */
29
29
 
 
30
 
30
31
#ifndef PLUGIN_MEMCACHED_STATS_STATS_TABLE_H
31
32
#define PLUGIN_MEMCACHED_STATS_STATS_TABLE_H
32
33
 
33
 
#include "drizzled/plugin/info_schema_table.h"
34
 
 
35
 
#include <vector>
36
 
 
37
 
class MemcachedStatsISMethods : public drizzled::plugin::InfoSchemaMethods
 
34
#include "drizzled/plugin/table_function.h"
 
35
#include "drizzled/field.h"
 
36
 
 
37
#include <libmemcached/memcached.h>
 
38
 
 
39
class StatsTableTool : public drizzled::plugin::TableFunction
38
40
{
39
41
public:
40
 
  virtual int fillTable(drizzled::Session *session,
41
 
                        drizzled::Table *table,
42
 
                        drizzled::plugin::InfoSchemaTable *schema_table);
 
42
 
 
43
  StatsTableTool();
 
44
 
 
45
  class Generator : public drizzled::plugin::TableFunction::Generator
 
46
  {
 
47
  public:
 
48
    Generator(drizzled::Field **arg);
 
49
 
 
50
    ~Generator();
 
51
 
 
52
    bool populate();
 
53
  private:
 
54
    uint32_t host_number;
 
55
    uint32_t number_of_hosts;
 
56
    memcached_st *memc;
 
57
  };
 
58
 
 
59
  Generator *generator(drizzled::Field **arg)
 
60
  {
 
61
    return new Generator(arg);
 
62
  }
43
63
};
44
64
 
45
 
bool createMemcachedStatsColumns(std::vector<const drizzled::plugin::ColumnInfo *> &cols);
46
 
 
47
 
void clearMemcachedColumns(std::vector<const drizzled::plugin::ColumnInfo *> &cols);
48
 
 
49
65
#endif /* PLUGIN_MEMCACHED_STATS_STATS_TABLE_H */