~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin_qcache.h

  • Committer: Brian Aker
  • Date: 2009-03-19 17:37:58 UTC
  • mto: This revision was merged to the branch mainline in revision 944.
  • Revision ID: brian@tangent.org-20090319173758-yxj5kz4rrw8f04rr
Remove dead interactive variable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
21
 */
22
22
 
23
 
#ifndef DRIZZLED_PLUGIN_QUERY_CACHE_H
24
 
#define DRIZZLED_PLUGIN_QUERY_CACHE_H
 
23
#ifndef DRIZZLED_PLUGIN_QCACHE_H
 
24
#define DRIZZLED_PLUGIN_QCACHE_H
25
25
 
26
26
/* 
27
27
  This is the API that a qcache plugin must implement.
32
32
    false = success
33
33
    true  = failure
34
34
*/
35
 
class QueryCache
 
35
typedef struct qcache_st
36
36
{
37
 
  std::string name;
38
 
public:
39
 
  QueryCache(std::string name_arg): name(name_arg) {}
40
 
  QueryCache(const char *name_arg): name(name_arg) {}
41
 
 
42
 
  std::string getName() { return name; }
43
 
 
44
 
  virtual ~QueryCache() {}
45
37
  /* 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;
48
 
 
49
 
  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;
53
 
  virtual bool flush(Session *session)= 0;
54
 
};
55
 
 
56
 
#endif /* DRIZZLED_PLUGIN_QUERY_CACHE_H */
 
38
  bool (*qcache_try_fetch_and_send)(Session *session, bool transactional);
 
39
 
 
40
  bool (*qcache_set)(Session *session, bool transactional);
 
41
  bool (*qcache_invalidate_table)(Session *session, bool transactional);
 
42
  bool (*qcache_invalidate_db)(Session *session, const char *db_name,
 
43
                               bool transactional);
 
44
  bool (*qcache_flush)(Session *session);
 
45
} qcache_t;
 
46
 
 
47
#endif /* DRIZZLED_PLUGIN_QCACHE_H */