~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/query_cache.h

Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#ifndef DRIZZLED_PLUGIN_QUERY_CACHE_H
24
24
#define DRIZZLED_PLUGIN_QUERY_CACHE_H
25
25
 
 
26
namespace drizzled
 
27
{
 
28
namespace plugin
 
29
{
 
30
 
26
31
/* 
27
32
  This is the API that a qcache plugin must implement.
28
33
  it should implement each of these function pointers.
43
48
 
44
49
  virtual ~QueryCache() {}
45
50
  /* Lookup the cache and transmit the data back to the client */
46
 
  virtual bool try_fetch_and_send(Session *session,
47
 
                                  bool is_transactional)= 0;
 
51
  virtual bool tryFetchAndSend(Session *session,
 
52
                               bool is_transactional)= 0;
48
53
 
49
54
  virtual bool set(Session *session, bool is_transactional)= 0;
50
 
  virtual bool invalidate_table(Session *session, bool is_transactional)= 0;
51
 
  virtual bool invalidate_db(Session *session, const char *db_name,
52
 
                             bool transactional)= 0;
 
55
  virtual bool invalidateTable(Session *session, bool is_transactional)= 0;
 
56
  virtual bool invalidateDb(Session *session, const char *db_name,
 
57
                            bool transactional)= 0;
53
58
  virtual bool flush(Session *session)= 0;
 
59
 
 
60
  static bool addPlugin(QueryCache *handler);
 
61
  static void removePlugin(QueryCache *handler);
 
62
 
 
63
  /* These are the functions called by the rest of the Drizzle server */
 
64
  static bool tryFetchAndSendDo(Session *session, bool transactional);
 
65
  static bool setDo(Session *session, bool transactional);
 
66
  static bool invalidateTableDo(Session *session, bool transactional);
 
67
  static bool invalidateDbDo(Session *session, const char *db_name,
 
68
                            bool transactional);
 
69
  static bool flushDo(Session *session);
54
70
};
55
71
 
 
72
} /* namespace plugin */
 
73
} /* namespace drizzled */
 
74
 
56
75
#endif /* DRIZZLED_PLUGIN_QUERY_CACHE_H */