~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memcached_stats/stats_table.h

Blackhole, CSV, Pool of Threads,Single Thread, Multi Thread.

Show diffs side-by-side

added added

removed removed

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