~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/cache.h

Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
20
 */
21
21
 
22
 
#ifndef DRIZZLED_TABLE_CACHE_H
23
 
#define DRIZZLED_TABLE_CACHE_H
 
22
#pragma once
24
23
 
25
24
#include <boost/unordered_map.hpp>
 
25
#include <drizzled/identifier.h>
26
26
 
27
27
namespace drizzled {
 
28
 
 
29
class Session;
 
30
 
28
31
namespace table {
29
32
 
 
33
namespace instance {
 
34
class Shared;
 
35
 
36
 
30
37
class Concurrent;
31
38
 
32
 
typedef boost::unordered_multimap< TableIdentifier::Key, Concurrent *> CacheMap;
 
39
typedef boost::unordered_multimap< identifier::Table::Key, Concurrent *> CacheMap;
33
40
typedef std::pair< CacheMap::const_iterator, CacheMap::const_iterator > CacheRange;
34
41
 
35
42
class Cache 
55
62
  }
56
63
 
57
64
  bool areTablesUsed(Table *table, bool wait_for_name_lock);
58
 
  void removeSchema(const SchemaIdentifier &schema_identifier);
59
 
  bool removeTable(Session *session, TableIdentifier &identifier, uint32_t flags);
60
 
  void release(TableShare *share);
 
65
  void removeSchema(const identifier::Schema &schema_identifier);
 
66
  bool removeTable(Session *session, identifier::Table &identifier, uint32_t flags);
 
67
  void release(table::instance::Shared *share);
61
68
  bool insert(table::Concurrent *arg);
62
69
 
63
70
  boost::mutex &mutex()
75
82
} /* namepsace table */
76
83
} /* namepsace drizzled */
77
84
 
78
 
#endif /* DRIZZLED_TABLE_CACHE_H */