~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/cache.h

  • Committer: Brian Aker
  • Date: 2011-04-12 16:33:34 UTC
  • mfrom: (2272.1.3 cache)
  • Revision ID: brian@sccc-67-111-115-252.smartcity.com-20110412163334-cpk0qmwpqlroicb9
MergeĀ inĀ Olaf

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
class Cache 
34
34
{
35
 
  CacheMap cache;
36
 
 
37
35
public:
38
 
  static inline Cache &singleton()
 
36
  static Cache& singleton()
39
37
  {
40
38
    static Cache open_cache;
41
 
 
42
39
    return open_cache;
43
40
  }
44
41
 
45
 
  CacheMap &getCache()
 
42
  static CacheMap& getCache()
46
43
  {
47
44
    return cache;
48
45
  }
49
46
 
50
 
  void rehash(size_t arg)
 
47
  static void rehash(size_t arg)
51
48
  {
52
49
    cache.rehash(arg);
53
50
  }
54
51
 
55
 
  bool areTablesUsed(Table *table, bool wait_for_name_lock);
56
 
  void removeSchema(const identifier::Schema &schema_identifier);
57
 
  bool removeTable(Session *session, identifier::Table &identifier, uint32_t flags);
58
 
  void release(table::instance::Shared *share);
59
 
  void insert(table::Concurrent*);
60
 
 
61
 
  boost::mutex &mutex()
 
52
  static boost::mutex& mutex()
62
53
  {
63
54
    return _mutex;
64
55
  }
65
56
 
 
57
  static bool areTablesUsed(Table*, bool wait_for_name_lock);
 
58
  static void removeSchema(const identifier::Schema&);
 
59
  static bool removeTable(Session&, const identifier::Table&, uint32_t flags);
 
60
  static void release(table::instance::Shared*);
 
61
  static void insert(table::Concurrent*);
66
62
private:
67
 
  boost::mutex _mutex;
 
63
  static CacheMap cache;
 
64
  static boost::mutex _mutex;
68
65
};
69
66
 
70
 
CacheMap &getCache(void);
71
 
void remove_table(table::Concurrent *arg);
 
67
CacheMap& getCache();
 
68
void remove_table(table::Concurrent*);
72
69
 
73
70
} /* namepsace table */
74
71
} /* namepsace drizzled */