~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/cache.h

  • Committer: Lee Bieber
  • Date: 2011-04-14 16:20:43 UTC
  • mfrom: (2277.1.3 build)
  • Revision ID: kalebral@gmail.com-20110414162043-2khq8mql7gvodnzn
Merge Olaf - Refactor Session Cache and Remove table::Cache::singleton()
Merge Olaf - Refactor Thread
Merge Olaf - remove unused functions

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#pragma once
23
23
 
 
24
#include <boost/thread/mutex.hpp>
24
25
#include <boost/unordered_map.hpp>
25
26
#include <drizzled/identifier.h>
26
27
 
27
28
namespace drizzled {
28
29
namespace table {
29
30
 
30
 
typedef boost::unordered_multimap< identifier::Table::Key, Concurrent *> CacheMap;
31
 
typedef std::pair< CacheMap::const_iterator, CacheMap::const_iterator > CacheRange;
 
31
typedef boost::unordered_multimap<identifier::Table::Key, Concurrent*> CacheMap;
 
32
typedef std::pair<CacheMap::const_iterator, CacheMap::const_iterator> CacheRange;
32
33
 
33
34
class Cache 
34
35
{
35
36
public:
36
 
  static Cache& singleton()
37
 
  {
38
 
    static Cache open_cache;
39
 
    return open_cache;
40
 
  }
41
 
 
42
37
  static CacheMap& getCache()
43
38
  {
44
39
    return cache;